Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts

    JPEG File Bulk Re-naming App

    I have a bunch of JPEG photos from a recent trip. The filenames are of the format "### IMG_XXXX", where ### represents numbers starting with 001 and incrementing by 1 for each consecutive file.
    In the process of editing and selecting which pictures to keep for showing, there are now gaps in the ### numbering sequence.

    What I'm looking for is a bulk re-naming app (preferably freeware) that will allow me to rename the ### part of the remaining files consecutively (starting with 001), without affecting the IMG_XXXX part of the filenames.

    I have not been able to find such an app. Can you help?

    Thank you.

  2. #2
    WS Lounge VIP Coochin's Avatar
    Join Date
    Jun 2014
    Location
    Queensland, Australia
    Posts
    2,154
    Thanks
    31
    Thanked 307 Times in 267 Posts
    Quote Originally Posted by LesF View Post
    ...What I'm looking for is a bulk re-naming app (preferably freeware)...
    You could check out IrfanView

    In IrfanView go to File\Batch Conversion/Rename

    You'll probably have to play around with the "Name pattern" settings to get the results you want.
    Computer Consultant/Technician since 1998 (first PC was Atari 1040STE in 1988).
    Most common computing error is EBKAC: Error Between Keyboard And Chairback
    AMD FX8120 (8-core @ 3.1GHz) CPU, Gigabyte GA-990FXA-D3 motherboard, 8GB (2x4GB) DDR3 1866MHz RAM, ATI-AMD Radeon HD6770 PCI-E VGA, 480GB Kingston SSD, 2TB Seagate SATA3.0 HDD, ASUS DVD/RW.

  3. #3
    Silver Lounger
    Join Date
    Oct 2012
    Posts
    2,335
    Thanks
    13
    Thanked 267 Times in 260 Posts
    Take a look at Bulk Rename Utility and see if a combination of remove and numbering field settings can get the job done. Conceptually I think you would actually be removing the first few digits and adding the new sequential number as a prefix. In any case it gives you a preview of what the new filename will be so you can play with the settings and see if it is going to work before committing the changes.

  4. #4
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 984 Times in 914 Posts
    I use Picasa to manage my photos. It retains the file names but arranges the photos into date named folders and allows me to add comments / titles to each picture without modifying the originals.
    http://windowssecrets.com/forums/sho...anizing-photos

    cheers, Paul

  5. #5
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Thanks for the replies.
    Coochin, I've been using Irfanview for years, but I can't figure out how do use the batch renaming option (which I've used many times) to do specifically what I want in this case.

    F.U.N., I'll take a look at that program. Thanks.

    Paul, in this case, arranging the photos by filenames and date (as you say Picasa does) is not what I need. The part of the filename ("XXXX") will not necessarily be in numerical or chronological order in the final slideshow, but the numbers "###" must be in numerical order and incremented by 1 for each photo. It doesn't sound like that's what Picasa will do.

  6. #6
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Hi, again.

    F.U.N., I tried the Bulk Rename Utility, but I was unable to make it do what I want.
    It's a complicated interface, so it may be that I just couldn't stumble on a combination that worked for me.

  7. #7
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 984 Times in 914 Posts
    Here is a batch file to do the work for you.
    1. Backup the files.
    2. Create a new file named "renamefiles.cmd" in the same directory as the image files.
    3. Right click on "renamefiles.cmd" and select Edit, then paste the code into it. Save.
    4. Open a command Prompt and CD to the same directory. e.g. CD C:\temp
    5. Run the batch file, e.g. renamefiles.cmd

    The code lists all files in the form "### IMG*.*", cuts off the ### section, then prepends a 3 digit number to each file.

    cheers, Paul
    Code:
    @echo off
    set _count=
    for %%A in (????IMG*.*) do call :_rename "%%A"
    goto :eof
    
    :_rename
    set /a _count+=1
    if %_count% LSS 10 set _filenum=00%_count%
    if %_count% LSS 100 if %_count% GTR 9 set _filenum=0%_count%
    if %_count% GTR 99 set _filenum=%_count%
    for /f "tokens=1,*" %%D in (%1) do ren "%%D %%E" "%_filenum% %%E"

  8. The Following User Says Thank You to Paul T For This Useful Post:

    LesF (2014-12-27)

  9. #8
    Silver Lounger
    Join Date
    Oct 2012
    Posts
    2,335
    Thanks
    13
    Thanked 267 Times in 260 Posts
    Here's what I did based on what I think is your criteria. Remove-three leading places and Numbering-mode Prefix, start 1, pad 3 and it turned 748 DTS into 001 DTS.
    Attached Images Attached Images

  10. The Following User Says Thank You to F.U.N. downtown For This Useful Post:

    LesF (2014-12-27)

  11. #9
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Paul, thanks for the reply. What I did was create a blank text file with Notepad, then named it renamefiles.cmd. However, if this is to be run as a batch file, why is it not called renamefiles.bat? In any case I'll give it a shot tonight when I resume work on my photos (showing about 600 out of 2200 taken). Thanks.

    F.U.N, thank you for that information. I've already uninstalled the Bulk Rename Utility, but if Paul's batch file doesn't do the job tonight, I'll re-install it and see how it works.

  12. #10
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Hi, again.

    Paul I tested your batch file and it works properly, assuming that I want to start my numbering at 001. But how would I change the file assuming that I want to start the numbering at other than 001 (for argument's sake, let's say that I want to start numbering from 432 and increment up by 1)?

    The reason I ask is that I have my photos in several different folders (one folder for each city on my trip), but I want to keep the numbers consecutive. I see that I wasn't clear about this in my original post.

    I realize that I can throw all my photos into one folder and renumber them using your batch file, then re-distribute them to their separate folders, but modifying your file (if possible) seems easier.

    Thanks again.

  13. #11
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,435
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Les,

    Just change: Set _Count=
    TO : Set _Count=431
    Note: there is a space between Set & _

    You use 431 because the first thing it does is increment it by 1 which will make it 432.

    Remember that you'll have to change the file for each set of pics to one less than the number you want to start with.

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  14. The Following User Says Thank You to RetiredGeek For This Useful Post:

    LesF (2014-12-27)

  15. #12
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Thanks, RG, this works.

  16. #13
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 984 Times in 914 Posts
    Here's a version with start and increment settings.

    cheers, Paul
    Code:
    @echo off
    rem Set the following 2 values for starting number and increment.
    set _start=1
    set _increment=1
    rem Don't change anything below this line - unless you know what you're doing. :)
    
    set _count=%_start%
    for %%A in (????IMG*.*) do call :_rename "%%A"
    goto :eof
    
    :_rename
    if %_count% LSS 10 set _filenum=00%_count%
    if %_count% LSS 100 if %_count% GTR 9 set _filenum=0%_count%
    if %_count% GTR 99 set _filenum=%_count%
    for /f "tokens=1,*" %%D in (%1) do ren "%%D %%E" "%_filenum% %%E"
    set /a _count+=%_increment%

  17. The Following User Says Thank You to Paul T For This Useful Post:

    LesF (2014-12-29)

  18. #14
    WS Lounge VIP Calimanco's Avatar
    Join Date
    Dec 2009
    Location
    UK
    Posts
    721
    Thanks
    1
    Thanked 144 Times in 130 Posts
    If you just want to do a simple batch rename of the contents of a folder, open the folder, highlight all of the files by right clicking on the first to highlight it, press and hold shift and right click on the last file. All the files will now be highlighted. Right click on the first file again and rename it. Click on a space inside the folder. All the names will change.

  19. #15
    4 Star Lounger
    Join Date
    Jun 2010
    Location
    Littleton, Colorado
    Posts
    492
    Thanks
    33
    Thanked 6 Times in 6 Posts
    Paul, thank you, I appreciate your help.

    Calimanco, thanks for the info. I think you mean left-click in the first sentence to highlight the files. However, since your suggestion changes all the files in the folder to the SAME name (I can't see why you'd ever want to do that) it won't help in this particular case. Am I missing something?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •