Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

179.Batch file rename -- How to find all the sub-directories named 'abc', and rename them to 'def'?

User: editor -- 2008-06-06          << 178  180 >>
Hits: 677
Type: Batch file rename   
Search all Batch file rename examples
Description:
How to find all the sub-directories named 'abc', and rename them to 'def'?
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. select menu 'File->Load->DOS command output' 
2. input working directory where your directories located 
3. in 'DOS command' window enter: 

4. click 'OK', all directories with name 'abc' will be listed 
5. click ctrl-h open 'replace' dialog 
in 'Replace' page: 
* set replace unit to 'Line' 
* set search for pattern to: 

* set replace with pattern to: 

6. click 'Replace', and save the result to a.bat 
7. run a.bat, ok! 
Note: replace($match,'[\.\w ]+$', 'def') means replace the last word in $match to 'def'.
Download Script:  scripts/179.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to search a subset of xml filenames and rename them? (53%)
How to search all jpg files from subdirectory, rename and copy them into a specified directory? (52%)
How to expand all the numbers in the list and seperate them by comma? (50%)
How to sort the files by number, and batch rename them? (50%)
How to keep all specified words in an article and remove rest words? (46%)
How to extract all distinct parent folder names from a list of files? (46%)
How to shuffle all sentences ended by period within each line? (45%)
How to extract all function name and sub name from VBA script file? (45%)

Check Demo of Batch file rename
Keywords:
directories  dos command  dos  last word  command  ies  abc  directory  sub  find  rename directories  find replace file rename  find replace rename  rename abc  input directory  replace abc def  find word  rename directory