15

Possible Duplicate:
Which command can I use to recursively rename or move a file in Windows?

Is there a way, through the command line, to recursively rename all .m4v files to .avi?

ren *.m4v *.avi only works for the folder(s) selected, and ignores the folders under them, and as best I can tell there is no recursive parameter with that function.

David Gard
  • 1,451
  • 9
  • 24
  • 40
  • 1
    Same question as this: http://superuser.com/questions/205083/command-line-recursive-rename-move-in-windows – Sencer H. Jan 07 '12 at 10:43

1 Answers1

45

With a for loop, with recursive switch:

for /R %x in (*.m4v) do ren "%x" *.avi
Dodgyrabbit
  • 203
  • 2
  • 5
aleroot
  • 1,281
  • 12
  • 16