1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Can somebody make a quick batch file for me?

Discussion in 'Software Development' started by pincmonkey, Sep 7, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. pincmonkey

    pincmonkey Banned Thread Starter

    Joined:
    Jun 7, 2003
    Messages:
    173
    Hi, i recently renamed a bunch of files, which i didnt mean to, i only meant to do a few. The files are all located in the directory c:\publicdomain I am running windows XP, the log is attached of the files which were renamed. Please help me here, I'm at a total loss. The log works like this
    original filename
    new name
    thank you so much,
    pincmonkey
     

    Attached Files:

  2. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    I did some search n replace and cut n paste to get your started.

    For the rest, you just have to add the top line to the bottom line; make sure there is a space between the 2.

    (Only 1550 to go), but at least it's workable now.

    Because the original filename is first, that makes it difficult If the original filename was last, search n replace might work for all of it.

    I cannot think of a way to do the rest (except by hand), but there may be a way.

    I tried to set it up so that each set is separated by 1 line.

    I may be able to make a program to fix the rest, but not sure yet, but you might as well get started on fixing the rest of it.
     

    Attached Files:

    • ouch.txt
      File size:
      151.7 KB
      Views:
      210
  3. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    O.K.

    I made a program to do the rest.

    attached is woohoo.txt.

    rename it to woohoo.bat and run it in the directory where the files are at.

    No guarantee on the accuracy of it or how well it will handle the long, funky filenames. (That's why I used quotes though).

    You may want to copy the files to another directory and try the batch file on them first. That will also help you compare the differences if the batch file is not 100% perfect.

    Again no guarantees, but it's either try that or have fun doing it by hand.

    Edit: I reuploaded woohoo.txt. I fixed a few filenames that didn't have the trailing ". If the filename has spaces, it needs to be in quotes. Also, I fixed a few extensions that didn't get handled in the search n replace. It should be close to perfect, but I'm sure there are a few files that won't get renamed, but you can take care of the few that don't.
     

    Attached Files:

  4. pincmonkey

    pincmonkey Banned Thread Starter

    Joined:
    Jun 7, 2003
    Messages:
    173
    thanks so much ill try that
     
  5. pincmonkey

    pincmonkey Banned Thread Starter

    Joined:
    Jun 7, 2003
    Messages:
    173
    thanks! worked out great!
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/271337

  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.
    Dismiss Notice