Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Batch file to rename files in subfolders

Options
  • 04-07-2013 4:24pm
    #1
    Closed Accounts Posts: 322 ✭✭


    I'm looking for a cmd to rename a large number of files in a series of folders and subfolders. I want the names to continue in sequence no matter which folder they are in. Some folders contain both files and folders.

    Say I have folder1 with subfolder1 and subfolder2, then folder2 with a subfolder1

    folder1\file1.txt, file2.txt....file50.txt
    folder1\subfolder1\file51.txt, file52.txt....file100.txt
    folder1\subfolder2\file101.txt, file102.txt....file396.txt
    folder2\file397.txt, file398.txt....file600.txt
    folder2\subfolder1\file601.txt, file602.txt....file950.txt

    and so on.

    Anyone got a command that would do this?


Comments

  • Registered Users Posts: 4,188 ✭✭✭wil


    Bulk rename utility
    one of the best free rename utilities,
    Use the Remove, Add, and Number options
    ie 5,7,10 and tick Folders at bottom.
    Set remove to 50 or whatever longest length of filename.
    It previews so you see what will happen when you commit.

    Didn't even know it could work on subfolders till tried it now.

    Has command line option but I'm going to leave that for you to figure out:)


  • Closed Accounts Posts: 322 ✭✭ppshay


    Thanks. Worked great.


Advertisement