Edit the first two numbers of every file only

Post any Bulk Rename Command support requirements here. Open to all registered users.

Edit the first two numbers of every file only

Postby 2shae » Tue Aug 12, 2008 11:56 am

02-06-2008060024099.001
03-06-2008060024099.001
04-06-20080600100006.001


that is an example of a folder of files i have. i need to take the first two numbers of every file and remove 1 from every file. eg the files above should change to.

01-06-2008060024099.001
02-06-2008060024099.001
03-06-20080600100006.001

is this possible? there are about 400 files in the folder. and i have alot of these folders to rename. so doing it manually isnt an option.
2shae
 
Posts: 2
Joined: Tue Aug 12, 2008 11:47 am

Re: Edit the first two numbers of every file only

Postby Admin » Tue Aug 12, 2008 2:15 pm

Assuming this is a one-off exercise, what I would do is bring a directory listing in Excel and create a new field containing the new name (very straightforward with a fomula). The use the Import Rename Pairs facility of Bulk Rename Utiltiy (not Bulk Rename Command).


Jim
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm

Re: Edit the first two numbers of every file only

Postby 2shae » Tue Aug 12, 2008 3:07 pm

unfortunatly it is not a once of thing. there are about 30+ of these folders. id love to get a batch file that i could just copy into the folder. run it. then onto the next. i have used the import facility so far. but it takes quite alot of time
2shae
 
Posts: 2
Joined: Tue Aug 12, 2008 11:47 am

Re: Edit the first two numbers of every file only

Postby Admin » Tue Aug 12, 2008 3:14 pm

In an ideal world BRC would have a +/- feature, allowing an existing number or substring (e.g the clipboard contents) to be manipulated and pasted back into the filename, but unfortunately there's no functionality in there for that. It's something like that which would have overcome your issue.

Unless there's a smart way to do it with Regular Expressions, or via a laboriosu search and repalce (replace 02- with 01-, replace 03- with 02- etc) then I'm not sure where to look.


Jim
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRC Support