| User: editor -- 2010-03-13 << 445 447 >> |
| Hits: 362 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to remove all folders in a list containg folders and files? I have a list that containing many files and folders, how to remove all the folders and keep all files? Note that all folders are ended with a backslash. |
| Input Sample: |
| c:\folder1\ c:\folder1\file1 c:\folder1\file2 c:\folder1\file3 c:\folder2\ c:\folder2\f1 c:\folder2\f2 c:\folder2\f3 |
| Output Sample: |
| c:\folder1\file1 c:\folder1\file2 c:\folder1\file3 c:\folder2\f1 c:\folder2\f2 c:\folder2\f3 |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source text file 2. ctrl-h open 'replace' window * set 'Replace Unit' to 'Line' * set 'Search for pattern' to: 3. click 'Replace', done! 4. ctrl-s save to file |
| Download Script: scripts/446.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to remove all lines that have duplicate contents in CSV files? (67%) How to remove all lines that contain one or more words in a list? (64%) How to find all lines in file A that contain words in file B? (64%) How to remove all the lines that do not contain any of words in a list? (64%) How to remove all lines with duplicate value in column B in CSV file? (61%) How to remove/delete first column for multiple files? (60%) How to move all the jpg files to its parent folder? (60%) How to remove all the lines that with odd line number for multiple files? (60%) |
Check Demo of Advanced search and replace |
| Keywords: |
| backslash folders keep containing las folder many files old list contain many folders folders files search file with list replace text list text file remove all remove all text replace many files set file list |