There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers dvd error excel external hard drive firefox format freezes freezing hard drive hardware hijackthis internet internet explorer ipod itunes laptop malware mouse network networking outlook 2007 power printer problem ram router screen slow sound trojan upgrade usb virus vista vista 32-bit windows windows xp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Can somebody make a quick batch file for me?


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. Enjoy!

Closed Thread
 
Thread Tools
pincmonkey's Avatar
Senior Member with 237 posts.
 
Join Date: Jun 2003
Location: Earth
07-Sep-2004, 07:03 PM #1
Can somebody make a quick batch file for me?
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
File Type: txt Logfile.txt (188.6 KB, 45 views)
__________________
-pincmonkey/unit321
If you have time drop by my site at www.johnscompany.net
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
08-Sep-2004, 06:02 AM #2
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
File Type: txt ouch.txt (151.7 KB, 33 views)
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
08-Sep-2004, 06:31 AM #3
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
File Type: txt woohoo.txt (147.2 KB, 37 views)
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run

Last edited by Shadow2531 : 08-Sep-2004 06:41 AM.
pincmonkey's Avatar
Senior Member with 237 posts.
 
Join Date: Jun 2003
Location: Earth
08-Sep-2004, 06:40 PM #4
thanks so much ill try that
pincmonkey's Avatar
Senior Member with 237 posts.
 
Join Date: Jun 2003
Location: Earth
08-Sep-2004, 10:14 PM #5
thanks! worked out great!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:57 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.