Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [UR] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=23)
-   -   how to change urls from c:\... to e:\... in one go (https://www.kinook.com/Forum/showthread.php?t=3025)

jschrot 09-21-2007 07:11 PM

how to change urls from c:\... to e:\... in one go
 
After partioning my harddrive the urls to my local files changed from C:\... to E:\... Consequently, hundreds of files linked to in UR can't be opened from UR any more. So my question is: How can I replace the "C" in the attribute "URL" with "E" in all items in a UR-Database (without manually changing the letter in each item)? There seems to be no global "replace"-command.

ashwken 09-21-2007 07:54 PM

Just a stab in the dark...

From the Root node, File | Export - to xml, select to export ALL fields, recurse subfolders, then do the replace on the resulting xml file in your favorite text editor.

Open a new database in UR, then File | Import the modified xml.

'Course depending on your existing UR tree structure you may not need to start the export from the Root.

Unless anyone else has a better method.

If you can, store your local files in a subfolder structure below your UR database, then the import function (copy/link/move actions) will store a relative path in the URL attribute. Otherwise, you get the absolute path that you have experienced.

kinook 09-24-2007 09:03 AM

You could use SQLite to update the database, something like:

UPDATE ItemAttribute SET Value = 'e' || substr(Value, 2, 2000) WHERE AttributeID = 996 AND Value LIKE 'c:\%';

http://www.kinook.com/Forum/showthre...?threadid=2825

quant 09-24-2007 09:46 AM

Quote:

Originally posted by kinook
You could use SQLite to update the database, something like:

UPDATE ItemAttribute SET Value = 'e' || substr(Value, 2, 2000) WHERE AttributeID = 996 AND Value LIKE 'c:\%';

http://www.kinook.com/Forum/showthre...?threadid=2825

I was expecting this kind of reply, ... would it be hard to create replace dialog for UR?

Sth like ...

Search for "search_string"
Replace with "replace_string"
in "everywhere/attribute name"
options: case sensitive/whole words/prompt on replace/replace all


All times are GMT -5. The time now is 06:43 PM.


Copyright © 1999-2023 Kinook Software, Inc.