Advertisements

Mass Renaming of Files/File Extensions

View previous topic View next topic Go down

Mass Renaming of Files/File Extensions

Post by StonedTurtle on Wed Aug 17, 2011 11:31 pm

This is a two part tutorial because it took me a while to figure these things out and I figured it might help other people.

Mass Renaming of Files
Using this will allow you to select a large amount of a files and rename them with the same name but with an number on the end.
I.E.
musicfile(1).mp3
musicfile(2).mp3
musicfile(3).mp3

1) Highlight all of the files you would like to rename.
2) Right click on any of the highlighted files and select "rename".
3) Now on the selected file type the name you would like all of the files to have.
4) Hit enter, now all of the files should be renamed.

Mass Renaming of File Extensions
Let's say you have a folder that contains various files and filetypes that you don't want to be easily accessed, this is a method that will allow you to prevent people from opening these files without prior knowledge to what the file extension was. For this tutorial I'm going to assume the folder in question has 3 different file types; .txt, .mpg, .mp3.

1) Open up notepad
2) Now in notepad and type (or copy and paste the following)
Code:

ren *.txt *.bak
ren *.mpg *.bak2
ren *.mp3 *.bak3
3) Once done go to File > Save As. Change the name toBak.cmd and make sure the "Save as Type" is "All Files". Now save the file.
4) Now keep this file open and then enter the following;
Code:

ren *.bak *.txt
ren *.bak2 *.mpg
ren *.bak3 *.mp3
5) Now go to File > Save As. Change the name to fromBak.cmd and again make sure the "Save as Type" is "All Files".

Place these two files in the directory that contains the filetypes you want to change. Run toBak.cmd when you want to change the file extension so the files are unusable and run fromBak.cmd when you want to restore the files back to a usable form.

You can add as many extensions as you want, but make sure that each extension you add to the toBak.cmd has a different extension that it's changed to. I usually just increase the number after .bak for each extension. Also make sure you add on to fromBak.cmd so that they can be reverted back.

I think it's pretty self-explanatory, if you have any questions I'll try my best to help.
avatar
StonedTurtle
Wriggle Civilian
Wriggle Civilian

Posts : 4
Join date : 2011-08-17

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum