Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch rename file extensions, including subdirectories

I'm renaming empty file extensions with this command:

rename *. *.bla

However, I have a folder with hundreds of such subfolders, and this command requires me to manually navigate to each subfolder and run it.

Is there a command that I can run from just one upper level folder that will include all the files in the subfolders?

like image 455
Glenn Avatar asked Jun 22 '09 04:06

Glenn


1 Answers

for /r c:\path\ %G in (*.) do ren "%G" *.bla
like image 162
k3beast Avatar answered Nov 03 '22 15:11

k3beast