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: 6327
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 batch rename files to the first date found in the files? (67%)
How to batch rename PDF files with the date inside the file? (65%)
How to batch rename files to the specified pattern found in file content? (64%)
How to batch rename html files with specified text from html title tags? (64%)
How to batch rename html files to specified text from html title tags? (64%)
How to rename files to the first and last line of file contents? (64%)
How to rename hundreds of media files to their created date time? (63%)

Check Demo of Batch file rename
Keywords:
correction  last modified  modified  dos command  dos  encode  200  rename word  command  filenames  rename last modified  rename files with last modified date  batch file rename files with date modified  rename file last file modified  batch file last modified date and rename the file  rename date last modified batch  batch rename modified date  batch last modified rename