Use part of the directory name in the replace string
Posted: Mon Mar 13, 2006 11:38 pm
Hi, and thanks in advance for any help you can give.
I have lots of files found in subdirectories. I'd like to search the top level, and replace a string in files found in the sub directories with a portion of that sub directories name:
Search Path: \\server\directory ; Search in Subfolders ON
Search For: hrval'101'
This search will return hundreds of results, with the path being in this format:
\\server\directory\rep###\filename.txt with ### being a three digit number.
In filename.txt I'd like to replace hrval'101' with hrval'###', using the last 3 digits in the directory name.
Please let me know if this is possible, or if I should just bite the bullet and fat finger in the directory for the search path and replace script.
I have lots of files found in subdirectories. I'd like to search the top level, and replace a string in files found in the sub directories with a portion of that sub directories name:
Search Path: \\server\directory ; Search in Subfolders ON
Search For: hrval'101'
This search will return hundreds of results, with the path being in this format:
\\server\directory\rep###\filename.txt with ### being a three digit number.
In filename.txt I'd like to replace hrval'101' with hrval'###', using the last 3 digits in the directory name.
Please let me know if this is possible, or if I should just bite the bullet and fat finger in the directory for the search path and replace script.