Top "Batch-file" questions

A batch file is a text file containing a series of commands that are executed by the command interpreter on MS-DOS, IBM OS/2, or Microsoft Windows systems.

Executing Batch File in C#

I'm trying to execute a batch file in C#, but I'm not getting any luck doing it. I've found multiple …

c# batch-file process processstartinfo
How to create an infinite loop in Windows batch file?

This is basically what I want in a batch file. I want to be able to re-run "Do Stuff" whenever …

loops batch-file infinite-loop
How do I echo and send console output to a file in a bat script?

I have a batch script that executes a task and sends the output to a text file. Is there a …

windows batch-file cmd
How to automatically close cmd window after batch file execution?

I'm running a batch file that has these two lines: start C:\Users\Yiwei\Downloads\putty.exe -load "MathCS-labMachine1" "C:\…

batch-file cmd
What is the proper way to test if a parameter is empty in a batch file?

I need to test if a variable is set or not. I've tried several techniques but they seem to fail …

windows shell batch-file cmd
How to do something to each file in a directory with a batch script

How do you iterate over each file in a directory with a .bat or .cmd file? For simplicity please provide …

windows file loops batch-file cmd
Setting a system environment variable from a Windows batch file?

Is it possible to set a environment variable at the system level from a command prompt in Windows 7 (or even …

windows batch-file cmd environment-variables
Keep CMD open after BAT file executes

I have a bat file like this: ipconfig That will print out the IP info to the screen, but before …

batch-file cmd
How to delete all files and folders in a folder by cmd call

I use Windows. I want to delete all files and folders in a folder by system call. I may call …

windows batch-file
What is the best way to do a substring in a batch file?

I want to get the name of the currently running batch file without the file extension. Thanks to this link, …

batch-file substring