Ever been in the situation where you need to rename a bunch of files without giving them then same name with a number extension? Ever needed to rename a long list of images so they're search engine friendly? Well if the answer is yes, then your in for a real treat. There's a quick and easy solution to renaming files using Microsoft Excel (or any other spreadsheet software) and the windows command prompt.
For this example, I'll be renaming a folder of images so the name replaces spaces with dashes and adds a keyword to the end, making them more SEO friendly.
Here's how to go about doing this...
Step 1 - Generate Your File List
First thing is to get a list of all the files you want to rename. Start by opening the command prompt by clicking Start then typing
cmd(in XP, hit run and then type cmd). This will open up the command prompt.
Then we need to change the current directory to the one we want. An easy way of doing this is to open the folder and copy the location. Got the command prompt, type
cdand then right-click and hit paste. Hit enter and the directory we're working within will change to the one with all our images in.
Now we need to generate the list of images. Type this:
dir /b > _list.txt
This will create a list of all the files in the folder and export them to a new file called
_list.txt. You can call this file what you want.
Step 2 :
The fun starts now. Fire your copy of Microsoft Excel or Google Docs Spreadsheets and paste those file names into the first spreadsheet column.
And that's it tadaa all renamed.