Renaming multiple folders

Page 1 of 2 12 LastLast

  1. Posts : 5
    win7home64
       #1

    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 Computer


  2. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #2

    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.
    Last edited by lehnerus2000; 27 Nov 2012 at 20:22. Reason: Links Added
      My Computer


  3. Posts : 2,362
    Win7 H.Prem. 32bit+SP1
       #3

    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 Computer


  4. Posts : 1,660
    Windows 8 Pro (32-bit)
       #4

    Roderunner said:
    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 Computer


  5. Posts : 5
    win7home64
    Thread Starter
       #5

    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 Computer


  6. Posts : 5
    win7home64
    Thread Starter
       #6

    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 Computer


  7. Posts : 1,660
    Windows 8 Pro (32-bit)
       #7

    union865 said:
    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 Computer


  8. Posts : 5
    win7home64
    Thread Starter
       #8

    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 Computer


  9. Posts : 1,660
    Windows 8 Pro (32-bit)
       #9

    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 Computer


  10. Posts : 5
    win7home64
    Thread Starter
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 10:55.
Find Us