renaming file with first line in text

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

renaming file with first line in text

Postby sam_111 » Mon Jul 09, 2012 7:35 am

I would like to rename a batch of txt file with the first line of each file.

could someone guide me on how to do it?

thank you in advance
sam_111
 
Posts: 1
Joined: Mon Jul 09, 2012 7:33 am

Re: renaming file with first line in text

Postby fiddly bits » Mon Jul 09, 2012 6:17 pm

I don't think that BRU actually looks inside the text contents of a file.

You might want to try something like the very powerful AutoIT scripting language instead.

The algorithm should be quite easy:
Code: Select all
Select a folder
Process all files within it (recursion loop)
-Open file
-Read first line of file
-Close file
-Rename file
Continue loop

Alternately just use AutoIT to read the first line and write it to a text file that can be used as the input for the Bulk Rename Utility.

See discussion at http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=4&t=1502 as well.
fiddly bits
 
Posts: 10
Joined: Sun Jul 08, 2012 8:02 am


Return to BRC Support