Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Renaming multiple folders

27 Nov 2012   #1
union865

win7home64
 
 
Renaming multiple folders

I am trying to rename 100's of folders with a persons name convention. What I have now is the first name first and a space and then a last name. Sometimes the first name is instead initials with periods and spaces and then the last name. What I am looking to do is have the last name changed to the front of the folder, then have a comma, then a space, then the first name or initials, whatever was in front before. I have tried many different folder renaming programs and they all do some things really great, but none of them will take the letters after a space and put it in front of the folder name, then add a comma then a space.

Such as;
United States
Change to;
States, United
or;
U. S. America
Change to;
America, U. S.

Thanks for any help with this.


My System SpecsSystem Spec
.

27 Nov 2012   #2
lehnerus2000

Windows 7 Ultimate SP1 (64 bit), Linux Mint 17.1 MATE (64 bit)
 
 

There are various (free) programs available which may be able to help you.
http://www.bulkrenameutility.co.uk/Main_Intro.php
http://www.snapfiles.com/freeware/sy...ilerename.html
http://www.howtogeek.com/111859/how-...ultiple-files/

You should be able to find various scripts on the Internet which can do that job.

I use FreeCommander for my mass-renaming jobs.
My System SpecsSystem Spec
27 Nov 2012   #3
Roderunner

Win7 H.Prem. 32bit+SP1
 
 

Here is the easiest way to do it.
Open the folder, set view to list, highlight all, right click the top file & select rename. Enter the text you want & hit Enter. Job done.
My System SpecsSystem Spec
.


27 Nov 2012   #4
FuturDreamz

Windows 8 Pro (32-bit)
 
 

Quote   Quote: Originally Posted by Roderunner View Post
Here is the easiest way to do it.
Open the folder, set view to list, highlight all, right click the top file & select rename. Enter the text you want & hit Enter. Job done.
no.



That being said, it shouldn't be too hard to write a batch scrip to do it.
are all names in the "first(space)last" format? if the file name only has the one space, then that would make it pretty easy.
My System SpecsSystem Spec
28 Nov 2012   #5
union865

win7home64
 
 

That won't work because it will rename all the folders the same name. And no, it isn't just a name space name format.
My System SpecsSystem Spec
28 Nov 2012   #6
union865

win7home64
 
 

lehnerus2000, I tried all of those programs today and none of them give me what I want. I don't know what scripts are, but I'll google it and see if there is something out there that will do what I want. Thanks for the info though.
My System SpecsSystem Spec
28 Nov 2012   #7
FuturDreamz

Windows 8 Pro (32-bit)
 
 

Quote   Quote: Originally Posted by union865 View Post
That won't work because it will rename all the folders the same name. And no, it isn't just a name space name format.
Ok. is there any kind of method that is true in all cases, which would allow a program to consistently tell when the first name ends and the last name begins? Or at least enough of the times that you can manually fix them?
My System SpecsSystem Spec
28 Nov 2012   #8
union865

win7home64
 
 

Yes there is. There is a space before each last name, so if a program could start at the end of a folder name, go back and look for the first space, then copy everything to the right of that space, insert it in the front of the folder name, then add a comma and a space, it would work perfectly.
My System SpecsSystem Spec
28 Nov 2012   #9
FuturDreamz

Windows 8 Pro (32-bit)
 
 

Code:
Set objFS = CreateObject("Scripting.FileSystemObject")
strFolder = "C:\path\of\folder\of\folders"
Set objFolder = objFS.GetFolder(strFolder)
For Each Folder In objFolder.SubFolders
	strFolderName = Folder.Name
	For i=1 To Len(strFolderName)
		if Mid(strFolderName,i,1) = " " Then
			strEndOfFirst = i
		End If
	Next
	strFirstName = Mid(strFolderName,1,strEndOfFirst)	
	strLastName = Mid(strFolderName,strEndOfFirst + 1)
	strNewName = strLastName & ", " & strFirstName
	Folder.Name=strNewName
Next
change "C:\path\of\folder\of\folders" to the folder where the folders are located
save as "rename.vbs" but if you use notepad, remember to save as type: All Files(*.*)
then you should be able to just double click it and it'll run.
feel free to try it on sample folders first.
My System SpecsSystem Spec
28 Nov 2012   #10
union865

win7home64
 
 

AHHHHHHHHHH, it worked perfectly FuturDreamz. I didn't know you could do that within Notepad. I actually tried to run a test on it, but it ran when I tried to open it and modify it to go to a sub-folder first. They all came out GREAT. Geez, what a relief. Thanks a lot. Perfect perfect perfect
My System SpecsSystem Spec
Reply

 Renaming multiple folders




Thread Tools





Similar help and support threads
Thread Forum
Renaming folders problem
Hi there, everytime I try to rename one folder i got message: This is no longer located in C:/ bla bla Verify the items location and try again. When i click on Try again button win 7 finally renames a folder....is this a bug in the latest RTM release? anybody with a fix?
General Discussion
Error message when renaming folders
Windows 7 64bit, service pack one, fully updated Whenever I create a new folder in a window and go to rename it, a dialogue box pops up as below However when clicking on the "try again" button it renames the folder as if nothing was wrong. How come it's saying it can't find the item...
General Discussion
Renaming folders using wildcats
It is not possible to rename folders using wildcats for a batch file; are there any alternatives ? trying to rename folder vb_X_X using vb_*
General Discussion
Batch renaming folders and sub-folders
The structure of my photos library is Y/Y_M/Y_M_D, e.g. 2010/2010_04/2010_04_16 for today. I want to change all the '_' to '-'. Does anyone know an easy way of doing this?
General Discussion
Renaming folders
Started to have this problem a few days ago. I make a New Folder, the folder appears highlighted, I rename it and get this message (see image) I click on Try Again and the folder renames. I also get a similar problem dragging a file into a folder. This time the message says something...
Performance & Maintenance
FOLDERS -RENAMING and Moving
When I try to rename a folder , I get a comment like something open in another folder or program and I know of nothing that it is open - Hence I cant make a rename Also if I MOVE a File to another folder, it just copies it , and then it wont let me delete the original folder --- Doing...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 19:35.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App