View Single Post
  #5  
Old 12-18-2011, 09:25 PM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: [SOLVED]How to download files with timestamp in filename (Windows).


actually it's little dependent on your system's time display settings. for example the command
Code:
echo %date%.%time%
outputs
Code:
Mon 19/12/2011. 9:43:13.76
on my system. so i need to work with this string.

the following adjusted command outputs the filename from the above data in the format you want.
Code:
for /f "tokens=2-7 delims=/:., " %a in ("%date%.%time%") do set FileName="MyShow_%a-%b-%c_%d-%e-%f.flv"
Code:
set FileName="MyShow_19-12-2011_9-53-15.flv"
Reply With Quote