Batch renaming files in sub directories

There was a time that i want to change the file name but not only 1 or 2 files, it a lot of files and placed on several directory. How do i do it then? here we go:

Windows command prompt: (If inside a batch file, change %x to %%x)
[code]for /r %x in (*.html) do ren “%x” *.htm[/code]
This also works for renaming the middle of the files
[code]for /r %x in (website*.html) do ren “%x” site*.htm[/code]
Above script was for Windows.

Source: Stackoverflow

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *