General discussion


Changing multiple file names in a Windows Explorer folder

By techknow ·
I have a folder with maybe a couple of thousand files whose names all have certain characters I want to replace or delete (ie. for all files in this folder).

Is there any way to edit these changes for all the files in single commands instead of doing renames foe each, one at a time.

I think I could find a way to do pattern-match changes a VB.Net or C#.Net, but is there an easier way to do it in Explorer?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Shell script

by LiamE In reply to Changing multiple file na ...

Shell script is the easiest way.

To be honest thats a weakness of explorer.

Collapse -

Couple quick ideas.

by tbragsda In reply to Changing multiple file na ...

If the files are all named to some standard to start, you can do some ease dos manipulation.

All file names are like

and you want to change to

rename ??-??-????_UploadSomeBitForWhatever.txt ??-??-????_SomeOtherNameForEhatever.txt


Now, thats a limmited case. I can give many programmatic ways to do more complex, but how about this.

Start from whatever dir.
c:\SomeDir> Dir *.dbf /s/b /a-d > RenaFiles.txt

Open RenaFiles.txt with excel. You will have something like

Insert in column before the source files. Add rename, delete, whatever function you want. Add column c whatever renamed to etc. Save back out as a batch file, and run.


preform multiple operations on each file, change to two batch files.

Open RenaFiles.txt with Excel etc.
Insert column, and fill with call Batch2.bat
Save as Batch1.bat

So, Batch1.bat looks something like

call Batch1.bat c:\SomeDir\Sub\File1.dbf
call Batch1.bat c:\SomeDir\Sub2\File2.dbf

In Batch2.bat put whatever you would like, %1 is the filename.
Copy %1 d: /i /c
Rename %1 OldFile%1


Any help?

Post what the source files look like, and what you want to do, and Im sure we can come up with a good solution.

Collapse -

Thanks much...belatedly

by techknow In reply to Changing multiple file na ...

Sorry, did'nt get around to reading the second response until today. I had used RenameWiz software to rename the tons of files I needed to.

Thanks again...Ashok

Related Discussions

Related Forums