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

Renaming files

  • 09-06-2008 11:07am
    #1
    Registered Users, Registered Users 2 Posts: 224 ✭✭


    I have a folder which contains about 3000 images. They are all named e.g. 12345_01.jpg. I basically need to save them down to 12345.jpg loosing the "_01" bit.
    Any suggestions how i could go about this


Comments

  • Closed Accounts Posts: 8 allexxei


    What OS do you have there ?


  • Registered Users, Registered Users 2 Posts: 224 ✭✭The Mighty Dubs


    Win XP Pro


  • Closed Accounts Posts: 8 allexxei


    I don't think there is something allready done in the OS to help you to rename all files, so you should write a vbs file to do that


  • Registered Users, Registered Users 2 Posts: 2,152 ✭✭✭dazberry


    rename ?????_??.jpg ?????.jpg

    D.


  • Closed Accounts Posts: 8 allexxei


    I know ! , but you can't do it bulk with rename :) Wasn't this your problem ?

    That's why I said you should have a script to run this rename command


  • Advertisement
  • Closed Accounts Posts: 8 allexxei


    Try this

    rename *_01.jpg *.jpg


  • Registered Users, Registered Users 2 Posts: 2,013 ✭✭✭lynchie


    I have a folder which contains about 3000 images. They are all named e.g. 12345_01.jpg. I basically need to save them down to 12345.jpg loosing the "_01" bit.
    Any suggestions how i could go about this

    Plenty of free bulk file renamers around. Do a quick google.


  • Registered Users, Registered Users 2 Posts: 1,266 ✭✭✭00sully


    I wrote a nice app that does this with some nice options. drop me a pm and ill send it on to ya :)


  • Registered Users, Registered Users 2 Posts: 1,306 ✭✭✭carveone


    I have a folder which contains about 3000 images. They are all named e.g. 12345_01.jpg. I basically need to save them down to 12345.jpg loosing the "_01" bit.
    Any suggestions how i could go about this

    As dazberry sez, question marks will work if they are fixed width.

    Eg: rename ?_foo.jpg ?.jpg works for me.

    Else you can do it with a bit of messing:
    dir /b *_*.jpg > 1
    for /F "delims=_ tokens=1*" %i in (1) do rename "%i_%j" "%i.jpg"
    

    The dir makes a file called "1" with a list of names. The for options makes an entry like: 12345_01.jpg into two parameters. %i is "12345" and "%j" is the rest of the line. Thus for that file the command would be:

    rename "12345_01.jpg" "12345.jpg"

    The quotes are there in case the filename has spaces. Hope this helps.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    00sully wrote: »
    I wrote a nice app that does this with some nice options. drop me a pm and ill send it on to ya :)

    What part of don't ask for private messages in thread don't you understand?


  • Advertisement
Advertisement