Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Batch rename via Excel/Text file?

  • 08-03-2006 12:40PM
    #1
    Registered Users, Registered Users 2 Posts: 35,522 ✭✭✭✭


    Sorry if this is the wrong forum.

    I'm wondering if there is a program out there that can batch rename files based on a text file..

    For example: I have an excel file with two columns. One column has image numbers such as-
    IF779
    IF780
    IF781
    IF784
    IF785

    And this column corresponds to specific codes such as-
    HDA90233
    GH8002
    778HHAAK
    HUIAI77
    G1111111

    And I have a folder with files named as above-
    HDA90233
    GH8002
    778HHAAK
    HUIAI77
    G1111111

    I'd like these files in the folder to be renamed-
    IF779
    IF780
    IF781
    IF784
    IF785

    So what I need is a batch renaming program that reads some sort of text document and renames a file depending on its alternate filename...

    Sorry if that doesn't make sense, it's the middle of the week!


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 95,993 Mod ✭✭✭✭Capt'n Midnight


    insert a new column and put in it

    Rename

    then save as a csv/test file using TAB as the delimiter
    then rename the file tio .BAT

    or you could use a batch file to read a TAB'd list
    though it gets messy if there are spaces in the names

    FOR /F "tokens=1-2" %%i in (list.txt) do rename %%i %%j


  • Registered Users, Registered Users 2 Posts: 35,522 ✭✭✭✭Gordon


    Hmm, that made no sense to me but I checked out .bat files and I'm going to do this:

    REN HDA90233.jpg IF779.jpg
    REN GH8002.jpg IF780.jpg
    REN 778HHAAK.jpg IF781.jpg

    etc

    Cheers! I didn't think anything like that was going to be possible.


Advertisement