Page 1 of 1

Is this possable? String replace with Directory path

Posted: Mon May 16, 2005 3:16 pm
by Loki008
i have a directory containing several sub directories with images and a text file acting as an index for those images... basically what that file looks like is

VN,F123456,X:\User\Project\F123 456R\,99
IM,F123-456-9000002, ,2,@F123456;;doc1.pdf;5


what i need to do for when the files are moved from the local directory to the server is replace the X:\ with a DFS path. right now i am just deleteing the first line and manually creating the volume path on the server. the second line is the image info, what i neeed to do here is take the \Project\F123 456R\ from the first line and place it where the ;; is.

basically what i am looking for is a way to take the path from the line above and replace it in between the ;; this has to be automated because it will be processing up to several hundred sub directories. also each subdirectory has its own index file, so its not like this is one file i am editing

also i would like to be able to then replace the path, for example change

VN,F123456,X:\User\Project\F123 456R\,99



any help on these 2 replacements would be greatly appreciated


Posted: Thu Jun 02, 2005 4:04 pm
by Abacre
Hi Adam,

Yes, it's possible to do it with AFR.

What should you do for the first case:
Please download the latest version of the program:

This is only updated EXE file. You need to extract executable file from
zip archive into folder where the program is installed. So you will
replace old executable file by this new one.

Start the program. Go to main menu - Action - Options - "Batch
replace" check on the options:
Replace until found is ON
Modifier S is ON.

Press OK.

In main window go to Batch replace tab.
Check on "Use regular expressions".
Then fill the grid:
Search for:
Replace with:

That's all. You may press now Execute button.
I verified it perfectly works.

For the second case you may use, for example, the search for:
(VN,.+,)X:\User\Project\F123 456R\,
replace with: