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.

Get Date in YYYYMMDD format in windows batch file

I need to get the date in YYYYMMDD format in batch file. I am doing this using : set mydate=%date:~6,4%%…

windows batch-file
Logical operators ("and", "or") in DOS batch

How would you implement logical operators in DOS Batch files?

batch-file cmd logical-operators windows-console
How to verify if a file exists in a batch file?

I have to create a .BAT file that does this: If C:\myprogram\sync\data.handler exists, exit; If C:\…

windows batch-file cmd
Get current batchfile directory

Firstly, I saw this topic but I couldn't understand that. Question : There is a batch file in D:\path\to\…

windows batch-file working-directory
Using parameters in batch files at Windows command line

In Windows, how do you access arguments passed when a batch file is run? For example, let's say I have …

windows batch-file cmd parameters arguments
Split long commands in multiple lines through Windows batch file

How can I split long commands over multiple lines in a batch file?

batch-file
How to read file contents into a variable in a batch file?

This batch file releases a build from TEST to LIVE. I want to add a check constraint in this file …

batch-file
Batch not-equal (inequality) operator

According to this, !==! is the not-equal string operator. Trying it, I get: C:\> if "asdf" !==! "fdas" echo asdf !==! was …

batch-file operators
Batch file. Delete all files and folders in a directory

I want to have a batch file that will delete all the folders and files in my cache folder for …

batch-file batch-processing
How do I measure execution time of a command on the Windows command line?

Is there a built-in way to measure execution time of a command on the Windows command line?

windows batch-file time cmd windows-server-2003