Abacre.com

General discussions about products.
It is currently Thu Jul 29, 2010 9:02 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Is this possable? String replace with Directory path
PostPosted: Mon May 16, 2005 3:16 pm 
Offline

Joined: Mon May 16, 2005 2:59 pm
Posts: 1
Location: Hartford, CT
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-9000001,D,1,@F123456;;doc1.pdf;5
IM,F123-456-9000002, ,2,@F123456;;doc1.pdf;5
IM,F123-456-9000001,D,1,@F123456;;doc2.pdf;5

ect...

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

into

VN,F123456,\\Clientname\UserImages\,99

any help on these 2 replacements would be greatly appreciated

thanks
adam


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 4:04 pm 
Offline
Site Admin

Joined: Mon Jan 31, 2005 5:32 pm
Posts: 940
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:
http://www.abacre.com/download/afrexe.zip

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:
(VN,.+,.+:\\.+)(\\.+)(,.+\r\n.*IM,.+,.+,.+,.+);;
Replace with:
$1$2$3;$2;

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:
$1\\Clientname\UserImages\,

_________________
Kind regards,
Roman Vasin
Abacre Limited
http://www.abacre.com
support@abacre.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group