Is this possable? String replace with Directory path
Posted: Mon May 16, 2005 3:16 pm
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
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