Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

787.Advanced search and replace -- How to delete a list of files from a directory and subdirectories?

User: editor -- 2011-05-23          << 786  788 >>
Hits: 322
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I want to delete files from a Directory and Subdirectories :

test.pdf
test.txt
test.exe
test.doc
123.lst
234.exe
etc....

I also want to be able to del this files listed in a LIST.TXT
can can I do this ?
Input Sample:
LIST.TXT:
test.pdf
test.txt
test.exe
test.doc
123.lst
234.exe


Output Sample:
delete these files from d:\example\ folder and subfolder
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. create a combined string from file list:

(1) ctrl-o open 'LIST.txt'
(2) ctrl-h open 'replace' dialog
* set 'search for pattern' to:

* set 'replace with pattern' to 

(3) click 'Replace', done.
2. open "Tools->Batch Runner" window, click "Search Files" button.
* set 'File name filter' to the combined filename string:

* set 'Search directory' to the folder, like:

* check option of 'Search Subdirectory'
* click 'search' to search all files, and click 'close' when finish.
3. click "Run Apps" button, set the bottom entry to:

4. click "Run", all files in the list will be deleted.

Screenshot 1:  Replace_Window


Similar Examples:
How to put the file list of a directory into a text file? (61%)
How to split every file in a directory automatically? (61%)
How to remove duplicate lines in multiple files in different sub-folders? (56%)
How to replace the same words in text files with different strings? (56%)
How to move a list of files that in different folders to a common folder? (56%)
How to merge every 3 lines from file A and every 1 line from file B? (55%)
How to delete the 4th column from text files with 8 columns? (55%)
How to batch rename files with the first word of file contents? (55%)

Check Demo of Advanced search and replace
Keywords:
apps  directories  pdf  combine  subdirectory  123  doc  file name filter  ies  create  create list of files in folder  replace and create files from list  delete list  create a list of files  delete folder  create file list  create list  delete name