1

Suppose I have the files as below

C
|_tmp
    |_a.txt
    |_b.txt
    |_c.txt

I use rename *.txt 20110822*.txt, but not works.
Could anyone please suggest a method to append date in front of the files, thanks

Charles Yeung
  • 38,347
  • 30
  • 90
  • 130

1 Answers1

0
for %%i in (*.txt) do rename %%i 20110822%%i

Note that the double-percent-signs are only needed in a batch file. From an interactive command line, use only one percent-sign.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158