Monday, June 19, 2017

rename - Renaming all files of a particular type to lowercase batch


In this link Is there a way to batch rename files to lowercase?


there is a command given


for /f "Tokens=*" %%f in ('dir /l/b/a-d') do (rename "%%f" "%%f")

This works when i want to convert all filenames in a folder to lowercase.


However, is there any way to convert files of only one type (eg .RMT) to lowercase?


Thanks in advance.


Answer



Sure thing, just add "*.RMT" inside the dir expansion, so:


('dir /l/b/a-d')

becomes


('dir /l/b/a-d *.RMT')

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...