msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rename using wildcards

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS
Author Message
hmm



Joined: 04 Oct 2007
Posts: 1

PostPosted: Wed Feb 28, 2007 11:41 am    Post subject: Rename using wildcards Reply with quote

I have a group of files in a folder named File0001, File0002, ..., File0150,
with two files per name (two different extensions). I want to rename all
files with an underscore before the number (File_0001, File_0002, ...,
File_0150). I tried:

rename File*.* File_*.*

The files were renamed to File_001, File_002, ..., File_150; it dropped one
of the leading zeros, wheras I wanted all digits retained. I also tried
replacing the first asterisk with four questions marks (rename File????.*
File_????.*); same result.

Can anyone tell me how to achieve the desired renaming?

Archived from group: microsoft>public>vb>dos
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group