PC Review


Reply
Thread Tools Rate Thread

Batch file in Windows 2000

 
 
Mike
Guest
Posts: n/a
 
      20th Apr 2004
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.
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      20th Apr 2004
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


"Mike" <(E-Mail Removed)> wrote in message
news:197d01c426e4$d7a06ab0$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      20th Apr 2004
I think I had the day and month backwards there, if you're in US date
format. (Which I am! Oops.)

Ray at work

"Mike" <(E-Mail Removed)> wrote in message
news:197d01c426e4$d7a06ab0$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Guest
Posts: n/a
 
      21st Apr 2004
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?
 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      22nd Apr 2004
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

<(E-Mail Removed)> wrote in message
news:209001c42795$384d58e0$(E-Mail Removed)...
> 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?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch file IP Printer setup in Windows XP and 2000 Bobbie Weeks (Ms) Windows XP Print / Fax 1 2nd Nov 2006 05:48 PM
Unattended close of batch file-Windows 2000 Server Sp4 Davo Microsoft Windows 2000 1 18th Feb 2004 03:37 PM
batch file run once from windows 2000 server to client Cedric Microsoft Windows 2000 CMD Promt 2 28th Sep 2003 06:20 PM
How to Exit Windows 2000 Automatically Using a Batch File venkatesh Microsoft Windows 2000 Security 1 27th Sep 2003 08:00 PM
How to restart at 2000 server using batch file Ben Chaffin Microsoft Windows 2000 1 19th Aug 2003 03:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 PM.