Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

422.Batch file rename -- How to batch rename files with the first word of file contents?

User: editor -- 2010-02-16
Hits: 167
Type: Batch file rename   
Search all Batch file rename examples
Description:
How to batch rename files with the first word of file contents?

I have some files that has blank line in first line or first 2 lines, is there any way that rename this files with the first word appear in the test files?
Input Sample:
file1.txt
fiel2.txt
file3.txt
Output Sample:
<1st_word_of_file1>.txt
<1st_word_of_file2>.txt
<1st_word_of_file3>.txt
.
Answer:
Hint: You need to Download and install "Replace Pioneer" to finish following steps.
1. ctrl-B open 'Batch Runner' window
2. drag files from windows 'File Browser' and drop to 'Batch Runner' window
3. check option of 'set output filename', and change the entry followed to be:

to avoid filename duplicate, you can add 3 digit sequence number as prefix, like:

4. check preview of filename at the 'output file' column, and click 'File Rename' button, all files will be renamed.

Similar Examples:
Is there a way to batch rename files with the first line of the file content? (79%)
How to batch rename files with the first line of file content as new file name? (79%)
How to batch rename files to the first 8 characters of the second line of file content? (77%)
How to batch rename files by removing first 3 characters of filename? (72%)
How to rename files to the last 10 chars of 3rd line of file content? (71%)
How to batch rename files by removing the first 3 characters of each file name? (69%)
How to batch rename text files by adding the value of file content to filename? (68%)
How to batch rename file extension to the letter 8-10 of 2nd line of file content? (67%)

Check Demo of Batch file rename