1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Program that will rename and rearrange filenames in bulk?

Discussion in 'BBS Hangout' started by Xerobull, Feb 9, 2012.

  1. Xerobull

    Xerobull ...and I'm all out of bubblegum

    Joined:
    Jun 18, 2003
    Messages:
    37,235
    Likes Received:
    36,220
    I have tons of files that look like this:

    Firstname Lastname Description.pdf

    I need to rename and rearrange them to look like this:

    Lastname Firstname Description.pdf

    Some may even have a middle name or initial, which needs to go:

    Lastname, Firstname Middle Description.pdf

    Anyone know of a program that will do this? Thanks.
     
  2. heypartner

    heypartner Member

    Joined:
    Oct 27, 1999
    Messages:
    63,525
    Likes Received:
    59,043
    That should be easy, unless you need to convert their p*rn star name to their real name, too.
     
    1 person likes this.
  3. JuanValdez

    JuanValdez Member

    Joined:
    Feb 14, 1999
    Messages:
    35,110
    Likes Received:
    15,325
    heyp, lol.

    I used to use a shareware program called The Rename. You can do the name reshuffling in Excel and then import the list into the application and it renames everything in a couple of seconds.
     
  4. Air Langhi

    Air Langhi Contributing Member

    Joined:
    Aug 26, 2000
    Messages:
    21,950
    Likes Received:
    6,708
    opendir(dir, ".");
    @files= readdir(dir);

    foreach $file (@files){
    print "$file\n";
    if($file =~ m/(.*) (.*) (.*)\.pdf/){
    printf "found $file\n doing rename to $2 $1 $3.pdf\n";
    rename "$file","$2 $1 $3.pdf";
    }
    }

    THis is a perl script that will do it.
     
    1 person likes this.
  5. Shroopy2

    Shroopy2 Member

    Joined:
    Feb 16, 2003
    Messages:
    16,272
    Likes Received:
    2,064
    I don't have links, downloaded them couple years back

    I use a tools called
    Lupas Rename 2000 (clean UI))
    Bulk Rename Utility (or BRU. lesser UI, little learning curve but works nice)

    I've used them plenty. I dont know how to make it switch places with 2 words. (as in, a command to swap the first 2 full words of a file name). But if you've never used one before, its like the find/replace function in word document programs. (Find All: EGG WHITE. Replace All With: WHITE EGG) You have to tell it the SPECIFIC ACTUAL words. But maybe that code up above looks like what you have in mind
     
    #5 Shroopy2, Feb 9, 2012
    Last edited: Feb 9, 2012

Share This Page