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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Batch rename via Excel/Text file?

  • 08-03-2006 11:40am
    #1
    Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭


    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: 93,583 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,524 ✭✭✭✭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