"Testy" wrote:
> Im trying to write a w2k script line (to be used in a automated ftp bat
> file) that creates a directory named "thecurrentdate"


Mount/\Commands give you several different choices for using the date and
time in file names (or anywhere else that you need to). They all work
CONSISTENTLY across NT/2K/XP/K3 using only what is available "out of the
box".

The following examples use the "Interactive Mode" of the Mount/\Command Set.
Specifically the "." (aka "dot") command.

*******

C:\GuardPost>.
Type ". [prefix]" for a list of .Mount/\Commands -OR- ". Command" to
execute.

C:\GuardPost>. get
..GetCD
..GetCodePage
..GetCols
..GetDate
..GetFree
..GetFreeM
..GetIPAddr
..GetIPGateway
..GetIPMask
..GetLines
..GetLogDate
..GetLogTime
..GetLogTimeP
..GetMac
..GetNic
..GetOS
..GetPrompt
..GetRole
..GetTempFile
..GetTime
..GetTimeP

C:\GuardPost>. GetLogDate
20030730

C:\GuardPost>set #LogDate
#LogDate=20030730

C:\GuardPost>. ZeroFile %#LogDate%.txt

C:\GuardPost>dir /b *.txt
20030730.txt

C:\GuardPost>. GetLogTime
092255

C:\GuardPost>. ZeroFile %#LogTime%.txt

C:\GuardPost>dir /b *.txt
20030730.txt
092255.txt

C:\GuardPost>. GetLogTimeP
09225606

C:\GuardPost>. ZeroFile %#LogDate%-%#LogTimeP%.txt

C:\GuardPost>dir /b *.txt
20030730.txt
092255.txt
20030730-09225606.txt

C:\GuardPost>

*******

In a script, the commands above would be:

%.GetLogDate%
%.ZeroFile% %#LogDate%.txt

%.GetLogTime%
%.ZeroFile% %#LogTime%.txt

%.GetLogTimeP%
%.ZeroFile% %#LogDate%-%#LogTimeP%.txt