cmd

CMD For Loop does not hold set /a value

Didn't know how to explain this well, so here is the code @echo off set test=0 for /f %%a in (textfile.txt) do ( rem loops five times(5 lines in textfile.txt) set /a test=test+1 rem Adds 1 to Test echo %%a rem Echo's correct line in file echo %test% rem Echo's whatever X was before the loop ) echo %test% rem Displays the correct v...

WPF application crashed after user exit from CMD full screen mode.

...

How to do "diff -r" of UNIX in Windows Cmd Prompt?

How do I compare two directories on cmd prompt of Windows m/c? I want equivalent of diff -r of UNIX. ...

How to unzip a file using the command line?

Probably not possible to unzip files natively with dos...so what other ways can i unzip files through the command line? Preferably using open source/free tools Thanks ...

How to close the command window of a batch file which was started by another batch file

Hi. I created a perl script which starts another script. But the started script must be closed after it has performed its task. How can I do it? I have tried the EXIT command but i didnt work. Thanks. ...

Unicode output on Windows command line?

Hi, I wrote a small java application which output includes Unicode characters. When I use Eclipse to run it - I see all the output as expected. The people who are supposed to use the application will run it as a jar file. I thought they could use standard cmd window, but in this window the Unicode appear as Gibberish. Is there a way t...

ms speech from command line

Is there a way to use the MS Speech utility from command line? I can do it on a mac, but can't find any reference to it on Windows XP. Thanks. ...

Avoid blinking when launching a .cmd file

I was downgraded from Vista to XP for reasons that are not relevant. I found very useful the snipping tool which is not available in XP so I decided to create my own. It works just fine so I put it int .cmd file for easy launching ( I didn't feel like creating the .jar file ) My only problem now is the command prompt screen pops u...

Assigning a shortcut to open cmd here

Microsoft's powertoy is relatively well known. But it requires you to open a cmd one level above, from where you'd usually like. So I found this nice app, CmdOpenInstall (let's make the man some traffic :-) - it enables you to open cmd in the current directory. Is there a way to assign a keyboard shortcut to the command (which appears o...

Double Command To Run Programs In The Command Prompt

Hello, Please, help me in: how to put a double command in the cmd, like this in the Linux: apt-get install firefox && cp test.py /home/python/, but how to do this in Windows?, more specific in Windows CE, but it´s the same in Windows and in Windows CE, because the cmd is the same. Thanks! ...

sqlmetal.exe not found

Whenever i try to run sqlmetal, i get this: 'sqlmetal' is not recognized as an internal or external command, operable program or batch file this is from both CMD and the Visual Studio Command Prompt I've used sql metal many times on other machines, however it doesn't seem to work on this machine... Am i missing something? ...

How to make Notepad++ run script based on its name?

Hello. I want to make notepad++ run the "ruby {filename_here}" command if the current filename ends with .rb and "perl {filename_here}" if it ends with .pl. I've tried to use the NppExec plugin, but it can't do conditional stuff, so I wrote a bat @echo off if /i %~sx1 == .pl perl "%~f1" if /i %~sx1 == .rb ruby "%~f1" if /i %~sx1 == .p...

PHP - I need to run a .cmd file from within PHP and display the results

I need to run a .cmd batch file from within a php script. The PHP will be accessed via an authenticated session within a browser. When I run the .cmd file from the desktop of the server, it spits out some output to cmd.exe. I'd like to route this output back to the php page. Is this doable? Thanks in advance for your time. ...

windows: command line used to launch a program

How can I find out the command line options a program was launched with under windows? ...

console/command prompt app .net/c#

Any starting point/ideas for a custom console app which mimics the dos command prompt ? Basically looking for best practices and ideas for where to start Perhaps using powershell which frankly i've not looked at yet ! I know this is a little retro but i've found some limitations in the web app done using asp.net mvc etc. ( few of them ...

Exit in For loop - Windows Command Processor (CMD.EXE)

Hi, I am trying to find way to break / exit from FOR loop, if there are any error occured. Below is content of batch file. @echo on set myfile=D:\sample.txt FOR /F "tokens=1,2 delims=," %%i in (%myfile%) do call :process "%%i" :process set recfile=%1% echo %recfile% echo "Step in Test1" echo %errorlevel% pause; exit /B 0 If %errorl...

How expand a CMD shell variable twice (recursively)

Using the Windows XP CMD command-line I can expand a variable twice as follows: set AAA=BBB set BBB=CCC for /F "usebackq tokens=*" %i in (`echo %%AAA%%`) do echo %i will echo CCC. I.e. AAA has been expanded to the string BBB, and then the variable BBB has been expanded to CCC. This doesn't work from inside a batch script (i.e. a .cmd...

Powershell 2.0 out-file formatting nightmare...

How can I get Powershell to output a file IDENTICAL to the file produced by the following command? dir /s /b /a-d *.* > C:\files.txt should be easy, right?!! EDIT: I found ps was truncating the output based on the screen buffer width. Fix that with format-table and it pads with spaces... try format-list and you get property headings.....

Changing the title of a Command (CMD) window from NANT

Hello there, I would like to be able to change the title of the Command window at various points throughout my NAnt script. I have tried to use the task to call 'title myTargetName' but it gives me the following error: 'title' failed to start. The system cannot find the file specified Is there a way to do this please? Thanks ...

Switch Focus between Cmd windows, Force focus (keep 1 instant of program running)

hello, i am creating a simple windows cmd program, and i am trying to make sure it only runs once (if u double click the exe file, only one instance will show.. so in my code.. i added a named mutex(the name is a GUID) .. if a 2nd instance of the program was started, it would show the message telling you, that you already got an instanc...