I have a folder with hundreds of files. I need to rename the files in this folder one by one; but this takes a lot of time. I did some research and found that it can export names from a text file to files in any folder I want. But the videos contained insufficient information for me to implement it.
What I've been able to do so far:
Example files I:
Example files II:
I exported the file names to txt file with CMD; but the order of the fil names is not the same as in the TXT file with slight differences.
Note: This is not a big problem for now; but I would like to know if there is a way to do the correct sorting.
Example files III:
I batch corrected the filenames with EmEditor. Now I need to automatically replace these names with the files in the folder. Here I don't know how to do this. If anyone can provide practical information on this subject, I would be glad.
You can use Powershell and a regular expression to rename files. Go to the folder in Explorer, select Open Windows Powershell
on the File
menu, and enter the following:
Get-ChildItem *.zip | Rename-Item -NewName { $_.Name -replace '-[0-9]{4}-[0-9]{2}-[0-9]{2}(-[0-9]{2}-[0-9]{2}-[0-9]{2}\-utc)?\.zip$','.zip' }
References: