Step by Step Directions for Techs
Tag Archives: file time stamp
January 20, 2014Posted by on
I have found that when testing MDT deployments, I end up with a lot of USB drives and people asking for them to be updated. Inevitably, someone uses an old one to image and the complaints come rolling in.
This is a simple script that creates a file with a name that is a time stamp. That way, I know when I created the media.
For /F “tokens=2-4 delims=/ ” %%a in (“%DATE%”) DO SET MDY=%%a%%b%%c
FOR /F “tokens=1,2 delims=:” %%d in (“%TIME%”) DO SET ORAS=%%d%%e
REM output to file
echo TimeStampFile > \\servername\sharename\%MDY%_%ORAS%.txt
I save the file to the share that MDT copies the media to. That is done in the last time with \\servername\sharename. It produces a TXT file with the date and time in it. Right now it is Jan 20th, 2014 at 10:23 AM. The file name is 01202014_1023.txt.
Works great. Less filling.