Batch rename photos from a text file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheDA
    Confirmed User
    • May 2006
    • 4665

    #1

    Batch rename photos from a text file?

    Is there a prog or app that can do this.

    I have a folder of say 400 pics with default file names DSCF0001.jpg - DSCF0400.jpg.

    I need to rename them and don't want to do each one individually so wondered if a prog was the best way to go. I figured it was quicker cutting and pasting the new file names into one text file or excel document and have the prog or app do it. Ideally, if I can pull in the datestamp from the exif data into the filename also then great.

    Associated file names are sporadic and don't really follow a sequence.

    DSCF0001.jpg - boat1.jpg

    DSCF0002.jpg - house1.jpg

    DSCF0003.jpg - car1.jpg

    DSCF0004.jpg - house3.jpg

    DSCF0005.jpg - hotel1.jpg

    DSCF0006.jpg - boat2.jpg
    Sharleen Spiteri - 1989 - In The Ass
  • Babaganoosh
    ♥♥♥ Likes Hugs ♥♥♥
    • Nov 2001
    • 15841

    #2
    This can be easily done in any scripting language. PHP would be easiest.

    http://www.php.net/manual/en/functio...-read-data.php
    I like pie.

    Comment

    • Wolfy
      Confirmed User
      • Dec 2003
      • 3574

      #3
      are they on your windows machine?

      If so, select all, right click, rename - windows will rename them all [yourname]1.jpg [yourname]2.jpg etc.

      Comment

      • TheDA
        Confirmed User
        • May 2006
        • 4665

        #4
        Originally posted by Babaganoosh
        This can be easily done in any scripting language. PHP would be easiest.

        http://www.php.net/manual/en/functio...-read-data.php
        Thanks but beyond my abilities
        Sharleen Spiteri - 1989 - In The Ass

        Comment

        • TheDA
          Confirmed User
          • May 2006
          • 4665

          #5
          Originally posted by Wolfy
          are they on your windows machine?

          If so, select all, right click, rename - windows will rename them all [yourname]1.jpg [yourname]2.jpg etc.
          Yes, on a Windows machine, but the yourname portion is different for each one. Thanks.
          Sharleen Spiteri - 1989 - In The Ass

          Comment

          • CPimp
            Confirmed User
            • Aug 2009
            • 2346

            #6
            ACDSee might be able to do that for you
            three 997 three 55 three 1 ← That's my ICQ. Contact me there. Thanks.

            Comment

            • ReGGs
              Confirmed User
              • Apr 2006
              • 248

              #7
              separate them by the titles you want that then you can use a free program like xnview. Then all you have to do is rename them like this house# and it will number them accordingly.
              Last edited by ReGGs; 12-08-2009, 09:55 AM. Reason: sp

              Comment

              • TheDA
                Confirmed User
                • May 2006
                • 4665

                #8
                Originally posted by ReGGs
                separate them by the titles you want that then you can use a free program like xnview. Then all you have to do is rename them like this house# and it will number them accordingly.
                Thanks. I see a batch rename feature on that but does it let me pull in the names from a text file?

                It is that part that I essentially need.
                Sharleen Spiteri - 1989 - In The Ass

                Comment

                • Twistys Tim
                  Confirmed User
                  • Apr 2008
                  • 1923

                  #9
                  On my Mac I use a program called File List -- drag the list in, tell it what you want, and press rename.


                  $100 PPS Xmas Promo

                  [email protected]
                  ICQ 311545482
                  Skype timmy_vee

                  Comment

                  • james_clickmemedia
                    Confirmed User
                    • Apr 2003
                    • 2204

                    #10
                    there are lots of programs out their for windows. I am on the mac so use Name Mangler which works great.
                    $ CLICKMEMEDIA.COM $ CONVERTING ETHNIC TRAFFIC SINCE 1998 ~ $30+PPS
                    BLACK-X.COM - NEW BLACK EX-GF SITE
                    CLICKMEMEDIA.COM ~ ICQ - 8788771

                    Comment

                    • NemesisEnforcer
                      Confirmed User
                      • Aug 2003
                      • 2122

                      #11
                      Originally posted by tube2k
                      ACDSee might be able to do that for you
                      ACDSee will do that for you.
                      The Only Time When Success Comes Before Work Is In A Dictionary.

                      Did you ever notice: When you put the 2 words 'The' and 'IRS' together it spells 'Theirs.'

                      Comment

                      • SmokeyTheBear
                        ►SouthOfHeaven
                        • Jun 2004
                        • 28609

                        #12
                        php.. heres what you want to do

                        make a new folder on your server called temp, upload all images to temp, upload the list of new names in a file called newlist.txt filenames should be on a new line
                        example
                        name1.jpg
                        name2.jpg
                        name3.jpg

                        save this is index.php
                        Code:
                        <?php
                        
                        // open list
                        $list = file_get_contents("newlist.txt");
                        // split list into array
                        $listarray = explode("\n",$list);
                        // where to start list from , 0 = top
                        $count = "0";
                        // do something for each jpg in the folder starting with the first one
                        foreach (glob("*.jpg") as $filename) {
                        //rename the image to the corresponding name in the newlist.txt
                        rename($filename, "$listarray[$count]");
                        // show browser its done
                        echo "Renamed $filename -to- $listarray[$count]\n<br>";
                        $count = $count + 1;
                        
                        
                        }
                        ?>
                        upload to the folder temp
                        chmod folder 777
                        run the index in your browser
                        Last edited by SmokeyTheBear; 12-08-2009, 12:59 PM.
                        hatisblack at yahoo.com

                        Comment

                        • TheDA
                          Confirmed User
                          • May 2006
                          • 4665

                          #13
                          Thanks all. Looks like Smokey's is the best option for me. Thanks Smokey.
                          Sharleen Spiteri - 1989 - In The Ass

                          Comment

                          • TGThomas
                            Registered User
                            • Jan 2008
                            • 75

                            #14
                            af5 its free its easy and has lots of different items for you to use
                            You can contact me via the following:

                            AIM - playazdb0y
                            ICQ - 459454282
                            Email - [email protected]

                            Comment

                            Working...