| User: Vlad -- 2012-02-09 << 916 918 >> |
| Hits: 5955 |
| Type: Batch file rename |
| Search all Batch file rename examples |
| Description: |
| what is the easiest way to make 50000 copies of a file, and rename them with following format: word1-xxxx-yyyy-00001.txt word1-xxxx-yyyy-00002.txt ... word1-xxxx-yyyy-50000.txt where xxxx comes from a list of word in cities.txt, yyyy comes from a list of states.txt |
| Input Sample: |
| file: origin.txt file cities.txt with following lines: c1 c2 c3 ... c50000 file states.txt with following lines: s1 s2 ... s50000 |
| Output Sample: |
| copy origin.txt for 50000 times with following names: word1_c1_s1_00001.txt word1_c2_s2_00002.txt word1_c3_s3_00003.txt ... word1_c50000_s50000_50000.txt |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. join file cities.txt & states.txt to make a new file "c:\1.txt" with 100000 lines: 2. ctrl-h open 'replace' dialogue 3. set 'replace with pattern' to: 4. click 'advanced' tab * set 'run following at the beginning of replace' to: 5. click 'replace' button, following text are generated: 5. ctrl-s save the text to file mycopy.bat 6. put the mycopy.bat into the same folder with origin.txt, and click mycopy.bat to run, done. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |