Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-19-2015, 12:09 PM
wordmuse wordmuse is online now
Registered User
 
Join Date: 10-11-2006
Posts: 482
Using SQLite

After buying a new computer, I need to change the attribute of hundreds of local URLs to match the path on my computer.

I am trying to understand what is written here:
http://kinook.com/Forum/showthread.php?t=2825

But I don't understand it.

If my old path was something like:

c:\olduser\documents\urpfiles
and the new path is
c:\currentuser\documents\urpfiles

I get that I'm supposed to use this command with SQLLite:

-.-.-.-.-.-.-.-.-.-.-.-

Change an absolute path in all URL item attributes to a relative path:

UPDATE ItemAttribute SET Value = Replace(Value, 'D:\MyFolder\', '') WHERE AttributeID = 996 AND Value LIKE 'D:\MyFolder\%';

-.-.-.-.-.-.-.-.-.-.-.-

So what would be the exact command I'm supposed to use? Where do "olduser" and "currentuser" go in this command?

And hitting the nail on the head: this would do the replacing in the URL attribute?

Thanks.
- Bal
Reply With Quote
  #2  
Old 08-19-2015, 12:22 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Yes, the command updates the URL attribute. That command converts an absolute path to a relative one by removing the D:\MyFolder\ prefix on paths like D:\MyFolder\abc\xyz.txt to be just abc\xyz.txt -- if the .urd file is in D:\MyFolder, UR will handle the relative path abc\xyz.txt automatically so that it won't have to be changed if the .urd file and linked files in that folder or subfolder are moved.
http://www.kinook.com/UltraRecall/Ma...ronization.htm

If you actually want to replace one absolute path with a different absolute path, use something like the next command (Change all URLs...) to do the replacement:

UPDATE ItemAttribute SET Value = 'c:\currentuser' || substr(Value, 10, 2000) WHERE AttributeID = 996 AND Value LIKE 'c:\olduser%';
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:14 PM.


Copyright © 1999-2023 Kinook Software, Inc.