-
Append Date to a Filename
Hi,
How can I append the current system Date to file name in batch DOS file.
E.g file name using in batch file is test.txt, it should be text_052803.txt(in the format of MMDDYY)
Thanks
-
Hi
@echo off
for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set DATE=%%C%%A%%B
set DATE=%DATE:~2%
regards
Hrishy
-
Hi Hrishy,
Thanks for your time and help, I type exactly the same code in my batch file and when I execute from the DOS I get "syntax error" msg.
Can you please help me.
Thanks.
-
-
-
I have tried this link before,(method#2) still same error problem. Is it possible if you could try on your end; see if it works?
It would be helpfull.
Thanks
-
Whatever. Try a search on your own or waiting to get the answer here?
http://searchdatabase.techtarget.com...799184,00.html
-
Thanks for the update, I will try.
Thanks for your time & help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|