Well, teh ren command has changed, with some service pack (I have tested
with SP1 and does this bad renaming thing), but I can assure you in prior
versions the behavior was different. I'm trying to determine when that has
changed... in Windows 2003 Server, does the same bad thing. I'm pasting you a
KB article that describes the correct functionallity I have used in the past:
You must read the notes at the bottom, quoted from there:
"The Rename function in Windows Explorer does not match the behavior of the
REN command you may use at a command prompt. For example, if you had files
that are named smitha.doc, smithb.doc, and smithc.doc, you could use the ren
smith*.doc smythe*.doc command. All file names automatically show the new
spelling, and are renamed smythea.doc, smytheb.doc, and smythec.doc."
So, maybe their is some registry value I can change to get the old behavior
Thanks for your reply.
> It does the same thing in XP.
> The problem is that the original file name is 7 characters long, and the new
> filename is 8 characters long.
> Rename will truncate the beginning of the wildcard characters until it meets
> the same amount of characters in the original filename.
> If you did rename new*.txt tst*.txt, you would get the proper results of
> your file being renamed to tstname.txt
> "Pucara" <Pucara@discussions.microsoft.com> wrote in message
> > Hi,
> > Someone has noticed that the rename command (from cmd.exe) has changed
> > its behavior? before I used to rename files like this:
> > rename new*.txt test*.txt
> > and it will rename the files like this:
> > newname.txt to testname.txt
> > Now it seems to "ovewrite" the name to something like this:
> > from newname.txt to testame.txt
> > Note that the "n" has been overwritten. Someone know some workarround to
> > this? The help does not give much info...
> > I have hundreds of CMD and BAT files that I need to change...
> > Thanks,
> > Mariano.