Archive for the 'bat' Category

17
Mar
10

creating a folder based on today’s date


Here’s how you’d create a folder on Windows based on today’s date:

md %date:/=_%

18
Nov
09

setting batch variables from a file


If you need to store a variable to a file, and then need to read it back, you can do it like this:


set /p variable=<file.txt

assuming your file’s name is file.txt.

26
Aug
09

current directory in batch files


If you ever need the current directory in a batch script, you can get it through the environment variable %CD%. To see all the environment variables defined by the shell for you, run this :
set /?

Source of this was this MSDN blog.




Blog Stats

  • 223,848 hits