Batch file renames.

Discussion in 'Software' started by imran0505, Jul 22, 2010.

  1. imran0505

    imran0505 New Member

    4
    0
    13
    Hi,
    I need to rename a large number of jpeg files from one code to another using a list in a spreadsheet.

    Unfortunately, I have no experience with writing scripts and I cannot seem to find a suitable program that does this.

    Example
    CID No. DCODE
    50279 34019
    25782 34020
    39555 34022
    51276 34023
    75927 34024

    I just want replace the CID No. to DCODE.

    Can anyone please advise me of an easy way to do this?

    Many thanks
     
    Certifications: A+ N+, 70-271
    WIP: MCDST, MSCA
  2. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    Create a text file, name it rename.bat (make sure the extensions are shown as youll end up with rename.bat.txt and it will not work)

    right click and edit the file

    for the first entry put in (path is the path to the filename, filename is the old filename and newfilename is the new filename)

    ren "c:\path\filname.jpg" "c:\path\newfilename.jpg" (use quatotion marks if there is a space in the path)

    copy and paste this line, change to the 2nd filename on your spreadsheet

    Repeat until you have a line for every item

    Save it

    Double click to Run the file.
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  3. imran0505

    imran0505 New Member

    4
    0
    13
    Hi Thanks for your reply,

    I have about 1000 files to rename, this way seems quicker then renaming them manually but I was hoping to find something more automated.
    Do I have to purchase something to rename the jpegs using the spreadsheet instantly?
     
    Certifications: A+ N+, 70-271
    WIP: MCDST, MSCA
  4. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    A vbscript would probably be better for that amount
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.