Monday, May 1, 2017

command line - How to rename 80.000 files at once in Windows


I've 80.000 files in a folder and I need to rename all them from


filename.jpg

to


._filename.jpg

in Windows environment, I guess from dos. The reason is that I've compressed these files into a tar.gz from unix and copied into windows and for some reason the filenames have changed.


Could you tell me what's the command to do it ?
thanks


Answer



You can use the built in rename or ren command:



ren *.jpg ._*.jpg



Though, as with all these things, try it on a directory containing just a few files first.


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...