About 7,050,000 results
Open links in new tab
  1. Using parameters in batch files at Windows command line

    parameters passed in on the commandline must be alphanumeric characters and delimited by spaces. Since %0 is the program name as it was called, in DOS %0 will be empty for …

  2. How to code a BAT file to always run as admin mode?

    Mar 23, 2017 · The answers provided by both Kerrek SB and Ed Greaves will execute the target file under the admin user but, if the file is a Command script (.bat file) or VB script (.vbs file) …

  3. Create folder with batch but only if it doesn't already exist

    Nov 12, 2010 · Can anybody tell me how to do the following in in a Windows batch script? (*.bat): Create a folder only if it doesn't already exist; In more detail, I want to create a folder named …

  4. Windows batch files: .bat vs .cmd? - Stack Overflow

    Sep 29, 2008 · If both .bat and .cmd versions of a script (test.bat, test.cmd) are in the same folder and you run the script without the extension (test), by default the .bat version of the script will …

  5. Logical operators ("and", "or") in Windows batch - Stack Overflow

    Jan 26, 2010 · BAT is enough most of the time. 90% of the unix shell scripts ppl write is not pure shell but with many coreutils, sed, awk etc calls. GNU have implemented UNIX goodies in …

  6. Open a folder with File explorer using .bat - Stack Overflow

    Nov 25, 2013 · Save as: filename.BAT. Edit: Some people have reported a string after the START keyword, wrapping the path inside double quotes is better as the path can have files/folder …

  7. windows - How can I debug a .BAT script? - Stack Overflow

    May 29, 2017 · On one side, it indeed allows debugging .bat and .cmd scripts and I'm now convinced it can help in quite some cases; On the other hand, it sometimes blocks and I had …

  8. How to use if - else structure in a batch file? - Stack Overflow

    Jun 18, 2012 · I have a question about if - else structure in a batch file. Each command runs individually, but I couldn't use "if - else" blocks safely so these parts of my …

  9. What are "%1" and "%2" in batch files? - Stack Overflow

    Feb 22, 2010 · myfile.bat firstArg secondArg %1 becomes "firstArg" and %2 becomes "secondArg" The related shift command shifts the position of arguments one to the left. …

  10. How do you loop in a Windows batch file? - Stack Overflow

    Aug 31, 2009 · Conditionally perform a command several times. syntax-FOR-Files. FOR %%parameter IN (set) DO command syntax-FOR-Files-Rooted at Path