I have a problem and I don't know how to proceed.
We needed to change the location of stored documents which necessitated the changing of the path in SQL.
For most of the 138,000 records a script I've used worked fine.

The problem
There are many records where the attachment path is written as a URL.
For example:
http://ServerName/exponline/attachmentframe.jsp?filename=83089.pdf&fullpath=%5 C%5CServerName%5Cimagetool%5Carchive%5Chce%5C78%5C 83089.pdf&dk=h8Tjf4FcM7Km%2BpwH637w6w%3D%3D

Burried in all that mess is the path:

Does anyone know how to strip off the front and back portions of the filename, then convert %5C into a backslash?

Your help would be greatly appreciated.