dos batch files
hi folks,
can someone help me with a batch file, that renames a file and datestamps it.
ie a .log file and renames to 25_06_03.log
or something like that
using the rename command line ...
then i can schedule it from there..
??
cheers in advance
BB
can someone help me with a batch file, that renames a file and datestamps it.
ie a .log file and renames to 25_06_03.log
or something like that
using the rename command line ...
then i can schedule it from there..
??
cheers in advance
BB
pretty much the same as the version I had:
set mydate=%date%
set dd=%mydate:~0,2%_
set mm=%mydate:~3,2%_
set yy=%mydate:~6,4%
set newname=%dd%%mm%%yy%.log
ren sqllog.log %newname%
I guess t all depends on how your server is set up to handle dates!
set mydate=%date%
set dd=%mydate:~0,2%_
set mm=%mydate:~3,2%_
set yy=%mydate:~6,4%
set newname=%dd%%mm%%yy%.log
ren sqllog.log %newname%
I guess t all depends on how your server is set up to handle dates!
Thread
Thread Starter
Forum
Replies
Last Post



