| User: editor -- 2010-03-13 |
| Hits: 95 |
| 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" 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 |
Similar Examples: |
| How to remove all the lines that do not contain any of words in a list? (64%) How to remove all lines that contains more than one word? (60%) How to removing all leading zeros in a text file containing many numbers? (60%) How to rename many files with the last modified date of the file? (60%) How to remove/delete all symbols in a text file? (59%) How to remove/delete following text containing various time? (58%) How to remove all letters before "=" in each line of text file? (57%) How to extract all lines that contain words A and B and C? (57%) |
Check Demo of Advanced search and replace |