Computing.Net > Forums > Windows Vista > rename files in DOS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

rename files in DOS

Reply to Message Icon

Name: bjfactory
Date: May 7, 2009 at 19:45:13 Pacific
OS: Windows Vista
Subcategory: General
Comment:

Hi, I'm trying to do a rename where I want to,
for example rename these types of files in a for
loop. I've done it before but I can't seem to
remember the code I used:

file format is something like this where ##
denotes numbers
[ab-c] abc abc abc! - ## [abc].xxx

I want to rename them to
abc abc abc! ## [ab-c].xxx

I tried a for-loop like this
for %x in ("^[*^]*[a-zA-Z\! ]??*[0-9]*.xxx") do
ren %x "%2 %5^[%1^].xxx"

and another like

for %x in ("^[*^] *^[*^].xxx) do ren %x
"%2^[%1^].xxx"

It usually just doesn't work, but once I
replaced the name of a file with %2[%1].xxx!!

I know I'm obviously doing something wrong,
but I don't think I understand exactly how this
rename thing works with regular expressions.

I've also seen a lot of %%x but dos just tells
me it doesn't recognize %%x when I enter it...
what does that mean and how do I make this
work?

Thanks!



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


64 bit and 32 bit Dual booting.



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Vista Forum Home


Sponsored links

Ads by Google


Results for: rename files in DOS

remove unchecked files in msconfig www.computing.net/answers/windows-vista/remove-unchecked-files-in-msconfig/3933.html

Files in the external HD not listed www.computing.net/answers/windows-vista/files-in-the-external-hd-not-listed/4259.html

Modify boot file in Vista www.computing.net/answers/windows-vista/modify-boot-file-in-vista/7.html