I've had this issue before (prior to realizing any sort of monkeying with external container directories causes havoc). I managed to figure out a script that allows you to set the container references back. It's relatively simple to do; just was a big tricky to figure out.
Here's what you do:
Set Variable [ $path ;
Let ( [
field = GetAsText ( yourContainerField ) ;
detectString = Case ( PatternCount ( field ; "FILE:" ) ; "FILE:" ; PatternCount ( field ; "PDF :" ) ; "PDF :" )
"RC_Data_FMS/[remainderOfPath]/" & Right ( field ; Length ( field ) - Position ( field ; detectString ; 1 ; 1 ) - 4 )
Insert File [ yourContainerField ; $path ]
Lather, rinse. and repeat for each record / field. (I used a looping script.)
P. S. Just to drive the point home: Never, under any circumstances, make any sort of OS-level modifications to the external container directories or files. You will break the links between FileMaker and the assets and ... well, you know.
Thanks for the help and sorry for the long delay. Had to wait until after the holiday to attempt this. I haven't been able to get the script to work. When I run it, I get the error message
"The file “:612,792” could not be found and is required to complete this operation."
This happens regardless of what record I'm in or working in the original database or a copy. I'm sure it's something boneheaded on my part, but I can't figure out what. Any suggestions?
What does GetAsText ( ContainerField ) return?
Blue is what is returned for every record, black is unique info of the missing file.
Then you need to modify the calculation to extract the correct path from that information. You would do something like this:
field = GetValue ( GetAsText (containerField ) ; 2 ) (or 3 for imagemac)
detectString = "image:" (or "imagemac:")
"RC_Data_FMS/[path]/" & Right ( field ; Length ( field ) - Position ( field ; detectString ; 1 ; 1 ) - 6 ) (or 9 for imagemac)
You'll need to identify which one is the correct path to choose between image: and imagemac:, but that should do you.
Thanks! That's what I needed. You also helped me clue in that I needed to adjust the formula for the path because I'm not using the server version.
Happy New Year!