Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1009.Advanced search and replace -- How to copy a specific file to all sub-folders?

User: Lee -- 2012-10-01          << 1008  1010 >>
Hits: 3126
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
To be able to scan through a list of folders and copy a specific file to all sub- 
folders in that particular directory
Input Sample:
c:\Dir1\folder.jpg 
c:\Dir1\1\ 
c:\Dir1\2\ 
c:\Dir1\3\ 
c:\Dir2\folder.jpg 
c:\Dir2\1\ 
c:\Dir2\2\ 
c:\Dir2\3\ 
c:\Dir3\folder.jpg 
c:\Dir3\1\ 
c:\Dir3\2\ 
c:\Dir3\3\ 
c:\Dir4\folder.jpg 
c:\Dir4\1\ 
c:\Dir4\2\ 
c:\Dir4\3\ 
Output Sample:
c:\Dir1\folder.jpg 
c:\Dir1\1\folder.jpg 
c:\Dir1\2\folder.jpg 
c:\Dir1\3\folder.jpg 
c:\Dir2\folder.jpg 
c:\Dir2\1\folder.jpg 
c:\Dir2\2\folder.jpg 
c:\Dir2\3\folder.jpg 
c:\Dir3\folder.jpg 
c:\Dir3\1\folder.jpg 
c:\Dir3\2\folder.jpg 
c:\Dir3\3\folder.jpg 
c:\Dir4\folder.jpg 
c:\Dir4\1\folder.jpg 
c:\Dir4\2\folder.jpg 
c:\Dir4\3\folder.jpg 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume you have a text file that contain a list of folders like: 
c:\Dir1 
c:\Dir2 
... 
 
1. ctrl-o open the file with folder list. 
2. ctrl-h open 'replace' dialogue 
* set "replace unit" to "Line" 
* set "replace with pattern" to: 
 
* click "advanced" tab, set "run following for each matched unit to: 
 
3. click "replace", a list of batch commands is generated, like: 
 
4. ctrl-s save the commands to the a.bat 
5. click a.bat to run, done.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to copy all files under all sub-folders "sym" to common folder? (61%)
How to copy one file to create multiple duplicate files? (57%)
How to make column merge for files in two folders? (56%)
How to move all the jpg files to its parent folder? (55%)
How to move the jpg files under all the subfolders from xxx.jpg to oldxxx.jpg? (55%)
How to copy many files that defined in a list file to another folder? (53%)
How to remove duplicate lines in multiple files in different sub-folders? (52%)
How to extract all specific links from webpage? (52%)

Check Demo of Advanced search and replace
Keywords:
subfolders  subfolder  commands  decode  ecode  encode  batch command  folders  specific  command  batch file list directory items  search a particular pattern in batch file  list items in batch file  batch file list of items  batch file search all subfolders  batch file to search subfolders  copy specific  all batch commands