Hello!
TextCrawler has been the answer to so many of my problems, I'm proud to be a registered user.
Here's my question..
I'm trying to locate "<SampleName>SAMPLE" in multiple files and replace the word SAMPLE with the folder name that the file resides in.
Lets say the file is "C:\Anything\More\Trumpet\MyFile.xml"
I want to replace the text "<SampleName>SAMPLE" inside that file with "<SampleName>Trumpet"
Any ideas on how to accomplish this? I will be modifying a lot of different files in different folders. Thanks!
Replace string with parent folder name
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Replace string with parent folder name
Unfortunately the only replace options are
-Path+FileName
-FileName
and not the top path (which is what you want).
I can't think of a way of doing it without including the file name as well!
-Path+FileName
-FileName
and not the top path (which is what you want).
I can't think of a way of doing it without including the file name as well!