The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 11-18-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
I should mention, you have to double the %s if you are putting this in a batch file, i.e.

Code:
for /f "tokens=1-3 delims=/ " %%d in ('date /t') do ren test*.txt test%%d%%e%%f.txt
I'm not sure how you would include the time in the filename as well (I forgot about that part). Maybe it would be best to install Cygwin and get a real scripting environment!