Batch file in Windows 2000

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I would like to create a directory using the current date
by using a batch file. Does anyone have any info on the
proper syntax to get this done? Any assistance would be
greatly appreciated. Thanks in advance.
 
www.google.com would be one place to start. A better place is
http://groups.google.com. You'll find millions of posts with this question.
A common answer is something like:

for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set theYear=%%c& set
theMonth=%%b& set theDay=%%a)
mkdir %theYear%-%theMonth%-%theDay%

Ray at work
 
I think I had the day and month backwards there, if you're in US date
format. (Which I am! Oops.)

Ray at work
 
If I open a cmd window and run delprof.exe to a network
server, i.e. \\roc08cpa01
\BAT\delprof.exe /q /i /c:\\roc08cts01 it works fine.
However, if I double click on the batch file that contains
the same command it will not run, any suggestions and
explanations as to why this happens? How do I get this to
work in a batch file?
 
Is delprof in your %path%, or are you launching the batch file from the
directory with delprof.exe? Put PAUSE at the end of your batch file so you
can see what's going on.

Ray at home
 
Back
Top