Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

917.Batch file rename -- How to copy one file for many times with pre-defined name in a list?

User: Vlad -- 2012-02-09          << 916  918 >>
Hits: 4104
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


Similar Examples:
How to copy a file 100 times with different name from 1.txt to 100.txt? (63%)
How to replace letters with predefined numbers in a text range? (60%)
How to replace text files using multiple pre-defined rules? (60%)
How to convert multiple text files to html files with self-defined format? (59%)
How to batch rename files by a filename mapping list? (57%)
How to split a file into many files by chapters, and use Chapter names as filenames? (56%)
How to re-arrange lines with in a specified number of lines? (55%)
How to create files from template where filenames and keywords come from a list? (55%)

Check Demo of Batch file rename
Keywords:
easiest way  copies  xxxx com  500  yyyy  what  toc  copy one file for  ies  times  copy the same file many times and rename  copy one file many times  copy file many times rename from list  copy one file to many from list  rename one file into a list of file  copy one file and rename many times  copy and rename in same folder  copy many times the same file