Sunday 22 December 2019

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

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...