A little DOS batch hack: dates for filenames

Posted by 3DCAD Editor 

for /f “tokens=2-4 delims=/ ” %%i in (”%date%”) do copy foo.bat foo%%k%%i%%j.bak Thought I’d save this for reference. I’ve seen more complicated ways to create “yyyymmdd” strings, but this seems to work pretty well for me. Go to Source SHARETHIS.addEntry({ title: "A little DOS batch hack: dates for filenames", url: "http://www.3dcadtips.com/2008/11/a-little-dos-batch-hack-dates-for-filenames/" }); Read More →


Welcome, visitor!

To read this full article you must be logged in.

Not currently a registered user? Register here.

Comments

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.