CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: NoFormat

DosKey Macro to Make a TimeStamped Directory

261 Views
Copy Code Show/Hide Line Numbers
mtsd=echo off &&for /F "tokens=2,3,4 delims=/ " %i in ('date /t') do set dtName=%k%i%j$Tfor /F "tokens=1,2,3 delims=: " %i in ('time /t') do set dtName=%dtName%_%i%j%k$Tmd $1%dtName%$2$Tset dtName=&& echo on
by Al Gonzalez
  February 10, 2010 @ 2:27pm
Tags:
Description:
Assuming the date and time of 10 Feb 2010 at 5:26pm a directory will be created with the following name: 20060210_0526PM

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate