Can somebody make a quick batch file for me?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

pincmonkey

Thread Starter
Banned
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
 

Attachments

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.
 

Attachments

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.
 

Attachments

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top