hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

rename files in 6.x without using regex

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Variables and Regular Expressions
View previous topic :: View next topic  
Author Message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jun 20, 2007 8:49 am    Post subject: rename files in 6.x without using regex Reply with quote

user question (6.x where there is no regex)

I am trying to move an rename some files -

Have 3 files in one directory
W_FERRIC_1_20070618_1.TXT
W_PAC_1_20070618_1.TXT
S_FERRIC_1_20070618_1.TXT

I want to rename the W to 7 and the .TXT to .txt and to leave the S_ file wheer it is - thats it - but cannot do it

I have tried W^.TXT rename to 7^.txt - but this doesnt change the .TXT bit
I have tried W*.TXT to 7*.txt but this renames all three files
Have also tried many other combinations
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jun 20, 2007 8:50 am    Post subject: Reply with quote

In 6.x, you would have to do two rename tasks in sequence:
1) rename W_ to 7_
2) rename .TXT to .txt
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Variables and Regular Expressions All times are GMT - 8 Hours
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