Linked Questions

12 votes
2 answers
49k views

Possible Duplicate: Windows batch files: .bat vs .cmd? Hi, I am learning Windows Batch programming and come across this question: What's the difference between .bat and .cmd file? If they are ...
smwikipedia's user avatar
3 votes
1 answer
3k views

Possible Duplicate: Windows batch files: .bat vs .cmd? I know that the .cmd is the successor of the .bat (.cmd files use 32-bit execution while the .bat files use 16-bit execution) but most ...
Acaz Souza's user avatar
  • 8,701
232 votes
91 answers
229k views

What are some of the lesser know, but important and useful features of Windows batch files? Guidelines: One feature per answer Give both a short description of the feature and an example, not just a ...
35 votes
16 answers
99k views

I use WinXP sp3, and I have created a .bat file that does something. When I double click on it, a Notepad is opened and I can edit the batch file - but it is not run ??!?! I expect that when I double ...
DuduArbel's user avatar
  • 1,298
42 votes
9 answers
169k views

Why does this batch file never break out of the loop? For /L %%f In (1,1,1000000) Do @If Not Exist %%f Goto :EOF Shouldn't the Goto :EOF break out of the loop? Edit: I guess I should've asked more ...
user541686's user avatar
  • 213k
34 votes
3 answers
49k views

I'm trying to get spawn to effect an rm -rf node_modules followed by npm install (on windows 7; nx commands courtesy of a transparently installed CygWin. All nx commands resolve on a commandline just ...
Mike 'Pomax' Kamermans's user avatar
27 votes
2 answers
10k views

A frequent method to handling errors within Windows batch scripts is to use things like if errorlevel 1 ... or if %errorlevel% neq 0 .... Often times one wants the error handling code to preserve the ...
dbenham's user avatar
  • 132k
26 votes
1 answer
12k views

What is the order in which the Windows command prompt executes files with the same name, but different extensions? For example, I have a bunch of executable files: something.cmd, something.bat and ...
Dominik Grabiec's user avatar
13 votes
3 answers
10k views

Consider the following bat, test.bat (PC01 is off): mkdir \\PC01\\c$\Test || goto :eof If I run that bat from a command shell: > test.bat || echo 99 > if ERRORLEVEL 1 echo 55 The output is ...
Patrick's user avatar
  • 1,168
16 votes
5 answers
6k views

We have a bunch of .bat build scripts which are invoked by a PowerShell based GitLab runner that were recently refactored from: program args if !errorlevel! neq 0 exit /b !errorlevel! to the more ...
Chris Oldwood's user avatar
12 votes
4 answers
28k views

Similar to this question What programming languages are installed by default on Windows 7?. Is the environment any differnt for Windows 10? For some programs like MS OFfice you get the VBA, Chrome ...
Jay Killeen's user avatar
  • 2,932
8 votes
2 answers
28k views

There is a script.sh file set FABRIC_CFG_PATH=<some path> set CORE_PEER_LOCALMSPID=<some id> If I'm running this script in windows, the env variables are not getting set. Whereas if ...
SAURABH SINGH's user avatar
4 votes
1 answer
30k views

I feel like this has to be so simple and somehow I'm just missing something. I have 3 commands that I have to continuously execute back to back. How can I put those all into one batch file? Here are ...
Without Me It Just Aweso's user avatar
4 votes
2 answers
5k views

When running long command in .bat file (say 300 characters length) for example: Some_exe "C:/Documents and Settings/Some user/Some folder1/Some folder2/Some folder3/Some folder4 ... -Some_exe_arg1="...
JavaSheriff's user avatar
  • 7,741
2 votes
2 answers
10k views

For some back info to help you guys out, I'm making a small program that will take an .SQL file and restore it to the users localhost phpMyAdmin using mysql.exe. Importing the file through the MyAdmin ...
Brxxn's user avatar
  • 110

15 30 50 per page