In a “main directory” I have a lot of files, in a lot of subdirectories. Something like
C:\FirstDir\SecondDir\MainDir\MainSubDir\ <specific_subdirs> \*.edt
I need to find all the .edt files containing this line:
reference = someotherfile.ref
to replace it with the line:
reference = MainDir\RefSubDir\ <specific_subdirs> \someotherfile.ref
I was able to find&replace in a single directory, and then using this expressions:
find: (reference = )(?!<this_dir>)(.*\.ref) replace: \1MainDir\\RefSubDir\\<this_dir>\\\2
(where <this_dir> is the folder i’m searching in)
but it requires me to open one folder at time, copy/paste the folder name in the replace expression, replace all, and start again.
I have more than 150 folders to look.
There’s a way to put “automagically” the file parent directory in the replace string, so i can automate the whole process?
(or the full path, i can do more than one pass, as long the passes are less than the folders i have to do )