There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Do I have to do this in DOS?


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
The Elder's Avatar
Computer Specs
Junior Member with 8 posts.
 
Join Date: Aug 2000
Location: Eastern Massachusetts
Experience: Intermediate
06-Apr-2001, 02:13 PM #1
I have a series of a hundred or so files named 1ralph01.txt, 1ralph02.txt, etc.
I thought I could rename all of the files in one shot by executing (from the DOS prompt)
REN 1ralph??.txt ralph??.txt
That doesn't work. It renames the first file in the series, and then quits with an error message saying there is already another file by that name. To add to my frustration, even that first file doesn't come out the way I want it. It comes out ralphho1.txt.
It has been a VERY long time since I used DOS, but I have pleasant memories of how easy it was to write little batch programs for simple jobs like that. Is there an easy way to write and execute a batch file to do that task? Or is there a simple way to do tasks like that in Windows ME?
MacFromOK's Avatar
Senior Member with 1,947 posts.
 
Join Date: Mar 2001
Location: Oklahoma
Experience: idiota de la aldea
07-Apr-2001, 01:37 AM #2
Renaming multiple files in DOS is not really
practical unless you have a DOS batch tool that
will do some counting for you. The "shift"
parameter is pretty limited. If you have to
build a batch file with all the names in it,
you might as well rename them at the command
line (which can be done fairly quick with
DOSKEY loaded).

There's a program for Windows9x called VDS that
started out as a "batch file for Windows"
program, but has evolved into a really capable
language. It's shareware, but there is a FREE
16 bit version that will do lots more than batch
files ever could. Check it out here:

http://www.dialogscript.com/uk/qtour.html

I could give you some code to do what you want
(with a couple of editboxes for filename entries,
so it wouldn't just be a one-time use prog) if
you're interested in VDS.
The Elder's Avatar
Computer Specs
Junior Member with 8 posts.
 
Join Date: Aug 2000
Location: Eastern Massachusetts
Experience: Intermediate
07-Apr-2001, 07:22 PM #3
Do I have to do this in DOS
Thanks for your reply. I went to the web site you mentioned, but even that simple VDS progam seems to be several levels over my head. I think I can do what I want to the hard way, one file at a time, a lot faster than I could begin to understand the program, much less use it. But I thank you for the education and your kind offer.
MacFromOK's Avatar
Senior Member with 1,947 posts.
 
Join Date: Mar 2001
Location: Oklahoma
Experience: idiota de la aldea
07-Apr-2001, 07:34 PM #4
You are welcome.
LarryCore's Avatar
Distinguished Member with 5,244 posts.
 
Join Date: Aug 1999
Location: Rockford, IL
Experience: Advanced
10-Apr-2001, 11:24 PM #5
I'm a little confused. Your command should work.

1ralph01.txt should be renamed to ralph01.txt without an error message. You are saying it does not get renamed to that?

Before doing anything, copy 10 or so of the files to another folder, and use that folder to play with. That way you won't lose any files.

How about REN 1ralph*.txt ralph*.txt

That should work too.
__________________
"That is not dead
Which can eternal lie
Yet with strange aeons
Even death may die"
- H.P. Lovecraft
MacFromOK's Avatar
Senior Member with 1,947 posts.
 
Join Date: Mar 2001
Location: Oklahoma
Experience: idiota de la aldea
11-Apr-2001, 01:51 AM #6
Well, I just learned something (again).

REN doesn't work on my system, but RENAME
does work. What can I say (10 years in DOS
and that one escaped me).

OOPS... They both work. What an idiot.

I never renamed a bunch of files except
in Windows (unless I enumerated them,
that's why I mentioned counting in the
previous post). And in Windows, I wrote
a program to do what could have been
done with one DOS command...
What an idiot.

[Edited by MacFromOK on 04-11-2001 at 02:03 AM]
__________________
MacFromOK : PC User
Do I have all the answers?
I don't even have all the questions!

____________________________________________________________
davidgsmith's Avatar
Junior Member with 17 posts.
 
Join Date: May 2001
09-May-2001, 10:29 AM #7
Renaming multiple files
Hello THe Elder,

Try This method, and see if it works for you.

Good Luck,
Dave
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

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 10:04 PM.
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.