The text of the first line is what I would like to rename the file to.
Is this program capable of that?
Thank You
Can I rename a file to the contents of the first line?
-
- Posts: 4
- Joined: Sun Sep 16, 2007 7:35 am
Re: Can I rename a file to the contents of the first line?
Yes. It's possible with Advanced Find and Replace.
For example you have the file with the following text in it:
Go to main menu - Action - Options - Batch Replace
check "Include File Name Into Search Scope"
check "Rename File Name if it was changed"
check "Modifier S"
Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
.*\r\n(.*)\r\n
Replace with:
$1\r\n$1\r\n
That's all I verified it works perfectly.
For example you have the file with the following text in it:
Code: Select all
hello.txt
hello world
this is the test
the end of file
check "Include File Name Into Search Scope"
check "Rename File Name if it was changed"
check "Modifier S"
Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
.*\r\n(.*)\r\n
Replace with:
$1\r\n$1\r\n
That's all I verified it works perfectly.