Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

204.Batch file rename -- How to rename many files with the last modified date of the file?

User: editor -- 2008-06-27          << 203  205 >>
Hits: 620
Type: Batch file rename   
Search all Batch file rename examples
Description:
How to rename many files with the last modified date of the file?
Input Sample:
Old files:
filea.txt
fileb.txt
filec.txt
Output Sample:
New files:
20080606_01.txt
20080609_02.txt
20080603_03.txt
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Need to make a batch file and run, procedures:

1. open menu "File->Load->Dos command output"
2. enter "Dos command" as: dir *.txt, and select 'working directory, and click 'ok', all files will be read
3. ctrl-h open replace dialog

* set 'Replace Unit' to 'Line'
* set 'search for pattern':

* uncheck '[ ]Print Unmatched Unit' option
* set 'replace with pattern':


4. click 'Replace' , and save as a.bat 

5. copy a.bat to correct directory and run, okŁĄ 

Note: For filenames containing spaces, the step need to revised.

=============
Example of a.bat:

rename correction.txt 20071119_1.txt
rename country_id.txt 20071217_2.txt
rename encode.txt 20071119_3.txt

Note: following procedure is recommended for newer version:
http://www.mind-pioneer.com/services/276_Batch_file_rename.html
Formula: 
Download Script:  scripts/204.rst.zip

Screenshot 1:  Batch_Runner_Window


Similar Examples:
How to rename many files to the format of file.number.ext? (68%)
How to rename files to the last 10 chars of 3rd line of file content? (62%)
How to batch rename files with the first word of file contents? (60%)
How to rename many mp3 files to the format like artist-title.mp3? (60%)
How to rename mutiple files with the 3rd and 4th line in file content? (59%)
How to rename all files by adding a letter 'x' behind each filename? (59%)
How to rename files by removing last 8 digits and adding 6 digits? (58%)
How to merge many files into one file, and add filename before each file? (58%)

Check Demo of Batch file rename
Keywords:
dos command  encode  rename word  dos  filenames  200  command  encod  how to rename many files  rename many files  rename last modified  rename file last file modified  rename date last modified batch  batch rename modified date  batch last modified rename  batch to rename last modified file  batch file last modified date  batch search filenames