command-prompt

Replacing a fixed part of PWD in a tcsh prompt

偶尔善良 提交于 2020-01-04 06:30:12
问题 My prompt is currently displayed like here: [Aug-27 14:36] /x/y/z/w/u/v/dir1/dir2/dir3> What I would like to do is replace the constant partial-path of the current working directory /x/y/z/w/u/v with $WORK so eventually what will be displayed is [Aug-27 14:36] $WORK/dir1/dir2/dir3> /x/y/z/w/t/u is always the same path from which I usually do my work and for which I have a local variable $WORK set (very similar to the home ~ idea). A straight-forward solution will be most-welcomed as I really

Hiding command window in vb.net when running processes

◇◆丶佛笑我妖孽 提交于 2020-01-04 01:21:04
问题 If I have this code ' Send file to Unix server via pscp Dim Proc As New System.Diagnostics.Process Proc.StartInfo = New ProcessStartInfo("C:\Windows\System32\cmd.exe") Proc.StartInfo.Arguments = "/C C:\pscp.exe -pw " & PASSWORD & " " & physicalFolder & "\" & UNIXSCRIPTNAME & " " & unixLogin Proc.StartInfo.RedirectStandardInput = True Proc.StartInfo.RedirectStandardOutput = False Proc.StartInfo.UseShellExecute = False Proc.Start() ' Allows script to execute sequentially instead of

How to set SQUID Proxy authentication using netsh?

微笑、不失礼 提交于 2020-01-03 05:48:07
问题 I am behind a SQUID proxy. I need to set proxy settings for cmd. I'm using win7 so proxycfg cannot be used. I used netsh like this: netsh winhttp import proxy source=ie Internet explorer had my proxy settings already. Now the problem is that my proxy requires username/password authentication. I do not know how to set the username and password in command prompt. Any help would be greatly appreciated. Thanks in advance, 回答1: Here is the solution my friend Install CC Proxy. This software created

Using 'python -c' option in Windows command prompt

孤者浪人 提交于 2020-01-03 04:40:10
问题 I want to execute a python script string directly from command prompt in Windows . So after a bit of googling, I found the python -c option. I did, python -c 'print "Hello"' But it's giving the following error, File "<string>", line 1 'print ^ SyntaxError: EOL while scanning string literal The same command is working fine in Ubuntu, it prints hello How can I execute a python command directly in windows command prompt? 回答1: On Windows, reverse the quoting to quote the -c argument with double

Windows Shell Script “is was unexpected at this time.” in Command Prompt

左心房为你撑大大i 提交于 2020-01-03 03:01:26
问题 Very new to this, so I apologize if this is something simple. I am running the following .bat script in Command Prompt for an assignment. @ECHO off TITLE "KnockKnock.bat - The KnockKnock joke game!" COLOR 0E CLS ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. SET /p reply="Knock Knock! C:>" CLS IF NOT %reply% == "Who is there?" ( ECHO "Sorry, but you are not playing the game right!" GOTO :EOF) ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. ECHO. SET /p reply="Orange! C:>"

Pass parameter value to sql file from batch file using batch command

大城市里の小女人 提交于 2020-01-02 14:32:15
问题 I have a sql file update_qde.sql which contains the following code UPDATE profile_const set parameter_value = '04_2015' where profile_name = 'MIDAS_MTH_ALL_Panels' and parameter_name = 'PERIODS_TO'; commit; quit; I have another batch file test.bat I want to pass the parameter_value as a variable from a batch file using batch command. Could you please show me any way to do this? 回答1: Use SQLCMD variables, so change test.bat to call SQLCMD rather than ISQL @echo off sqlcmd -E -S myserver -i

Pass parameter value to sql file from batch file using batch command

喜你入骨 提交于 2020-01-02 14:31:24
问题 I have a sql file update_qde.sql which contains the following code UPDATE profile_const set parameter_value = '04_2015' where profile_name = 'MIDAS_MTH_ALL_Panels' and parameter_name = 'PERIODS_TO'; commit; quit; I have another batch file test.bat I want to pass the parameter_value as a variable from a batch file using batch command. Could you please show me any way to do this? 回答1: Use SQLCMD variables, so change test.bat to call SQLCMD rather than ISQL @echo off sqlcmd -E -S myserver -i

How to store the output of batch (CALL) command to a variable

时光总嘲笑我的痴心妄想 提交于 2020-01-02 10:18:55
问题 I have the batch file which has the command to call second.bat file. It will produce single line of output when it called. I want to store that line into variable. CALL second.bat I have tried using the following lines of commands but no use FOR /F "tokens=* USEBACKQ" %%F IN ('COMMAND') do SET result=%%F FOR /F "tokens=1 delims= " %%A IN ('COMMAND') DO SET NumDocs=%%A I don't know what to replace with COMMAND 回答1: As the help will tell you, COMMAND should be the command you want to run and

OSError: [WinError 193] %1 is not a valid Win32 application opencv.js

痴心易碎 提交于 2020-01-01 19:16:30
问题 I have tried to build opencv.js from the tutorial on their page. I have done all the steps except the last one to build it: C:\Users\student>python C:\Users\student\opencv\platforms\js\build_js.py documents which gives me this error: Args: Namespace(build_dir='documents', build_doc=False, build_test=False, build_wasm=False, clean_build_dir=False, config_only=False, emscripten_dir=None, enable_exception=False, opencv_dir='C:\\Users\\student\\opencv', skip_config=False) Cannot get Emscripten

OSError: [WinError 193] %1 is not a valid Win32 application opencv.js

吃可爱长大的小学妹 提交于 2020-01-01 19:16:02
问题 I have tried to build opencv.js from the tutorial on their page. I have done all the steps except the last one to build it: C:\Users\student>python C:\Users\student\opencv\platforms\js\build_js.py documents which gives me this error: Args: Namespace(build_dir='documents', build_doc=False, build_test=False, build_wasm=False, clean_build_dir=False, config_only=False, emscripten_dir=None, enable_exception=False, opencv_dir='C:\\Users\\student\\opencv', skip_config=False) Cannot get Emscripten