|
siquadri,
ren Test*.txt "Test%Date:/= % %Time::=.%.txt"
The above command is suggested to rename a file through a script with the current data and time; and is also an good illustration of character replace in batch scripts..
if you do a.. echo %Date:/= % it will replace : with a blank space
examples:
C:\Documents and Settings\ilango>echo %Date:/= %
Mon 04 06 2009
C:\Documents and Settings\ilango>echo %Date:/=;%
Mon 04;06;2009
C:\Documents and Settings\ilango>echo %Date:/=ilan%
Mon 04ilan06ilan2009
C:\Documents and Settings\ilango>echo %Date:/=*ilan*%
Mon 04*ilan*06*ilan*2009
/ilan
|