Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [UR] User Tips, Tricks and Samples (http://www.kinook.com/Forum/forumdisplay.php?f=28)
-   -   "Use relative path for file within database folder". How does it work? (http://www.kinook.com/Forum/showthread.php?t=4823)

cnewtonne 04-06-2011 07:00 AM

"Use relative path for file within database folder". How does it work?
 
Trying to understand how it works as the documentation is lacking (as i did not see it).

I have an info item 1 in db 1 linked to info item 2 in db 2. DB 1 and 2 are placed in same folder. I renamed this folder. Now, clicking on info item 1 fails to open info item 2 with db can not be found.

It does not matter if the "use relative path ..' box is checked or not.

What am I missing?

ashwken 04-06-2011 07:46 AM

I believe this refers to how the URL will be stored for imported data files,

files that are within or below the folder of the UR database location will be imported with a Relative Path,

files that are "outside" the UR database location will be imported with an Absolute Path.

The use of the Relative Path allows for transport of the UR database (and subfolders) to a new location without breaking the URL path. While this isn't an issue if data files are Stored upon import, it is an issue if the files are Linked.

cnewtonne 04-06-2011 08:23 AM

So I take it this setting does not effect linking between databases?

I hope not. So If I simply move these 2 urd databases to a new folder, all my inter-db links are broken?!!

This is any issue for example when I switched jobs, my user id changed so did the path to 'my documents'.

Thank you.

kinook 04-06-2011 12:13 PM

The 'Use relative path for file within database folder' option on the Insert Hyperlink dialog applies only to filenames like D:\Temp\test.urd and not UR inter-DB links like ur://D:/Temp/test.urd?item=1006,1000.

Inter-DB URLs are currently stored with absolute paths and must exist at the path in the URL. You could create a symbolic link to point from the old .urd path to the new location.
http://www.howtogeek.com/howto/windo...windows-vista/
http://stackoverflow.com/questions/4...nks-in-windows

cnewtonne 05-04-2011 07:55 AM

Just to share my findings and how I started doing it. The objective here is to create links (within/out) an UR database that are immune to changing directory paths, computers, and username dependent windows folders.

My directory structure looks like this ....
- c:\ultrarecall (or anywhere you like).
All below directories should reside underneath above.
- c:\ultrarecall\databases
- c:\ultrarecall\linked_files
- c:\ultrarecall\linked_images

Create a virtual drive pointing to c:\ultrarecall using 'subst' command ...
subst k: c:\ultrarecall

You should see a k: drive showing in my computer.

From now on, all links intra/inter UR databases should be created using the K: drive.

If you move these folders to a new machine or new directory path, you can maintain all links by creating a virtual drive using same letter that points anywhere you like.

Hope this helps.

mlwang 05-04-2011 08:28 AM

As a new UR user I'm just about to begin building my own database by importing a lot of files. Your suggestion is very helpful. Thanks, cnewtonne.

cnewtonne 05-04-2011 09:24 AM

My input was based on using xp. Even though the 'subst' command exists in windows 7, I heard/read about issues getting it to work and how to resolve them.

Here are some pointers to workarounds ...

http://techie-buzz.com/how-to/rename...s-windows.html

http://www.ntwind.com/software/utili...ual-subst.html

http://www.kjctech.net/2010/04/18/ho...ve-persistent/

If you have windows 7, please post your experience.

Thank you.

cnewtonne 05-04-2011 12:58 PM

Also,
Make sure you always open the db using virtual drive and NOT from the absolute path. This way all linkes created using ctrl+shift+I are generating using virtual drive.

Thank you.

mlwang 05-06-2011 01:08 AM

Quote:

Originally posted by cnewtonne
My input was based on using xp. Even though the 'subst' command exists in windows 7, I heard/read about issues getting it to work and how to resolve them.

Thanks for the heads up, for it reminds me of the issues I encountered when I used 'subst' extensively years past. I've forgotten most of the others, but the gravest problem (for me) is still vivid: files/folders deleted from a subst-ed drive do not go into the recycled bin. That makes managing files on the drive a risky endeavor.

I know, one can be careful and always use the original path instead of the subst-ed drive for such purposes, but I made such mistakes frequent enough for me to abandon the trick in the end. Tested again just now and the problem is still there, so I would go this route only when it's the only way.

I haven't tried it (or thought it through) yet, but I think using symlinks alone should be good enough.

zargron 05-06-2011 09:08 PM

Would be nice...
 
Quote:

Originally posted by kinook
The 'Use relative path for file within database folder' option on the Insert Hyperlink dialog applies only to filenames like D:\Temp\test.urd and not UR inter-DB links like ur://D:/Temp/test.urd?item=1006,1000.
Have restricted my linking between UR databases to "file level" rather than "item level" for this very reason.
Any chance of getting "relative path for UR inter-DB item links" acknowledged as feature request?

PS: A while ago i discovered, if i remember correctly:
. ur:///Temp/Sample.urd?item=#,#,#,#
will get item within "Sample.urd" stored within "Temp" folder on system drive, eg. where UR & Windows are installed, usually C: drive. Could be useful for those who only use C: drive whilst waiting for enhancement?

kinook 05-09-2011 07:12 AM

It's on the todo list.

cnewtonne 05-12-2011 07:19 AM

1 Attachment(s)
Quote:

Originally Posted by mlwang (Post 18824)
files/folders deleted from a subst-ed drive do not go into the recycled bin. That makes managing files on the drive a risky endeavor.

I did find out about this later and this is how I worked around it ...
1) I use folder sync software to sync/backup my databases hourly.
2) This is where software tools like MacroExpress really really really shine. I wrote a marco to disable the delete key when the Q:\ drive window is open. I attached a screen paste.

mlwang 05-13-2011 05:02 AM

Quote:

Originally Posted by cnewtonne (Post 18846)
I did find out about this later and this is how I worked around it ...
1) I use folder sync software to sync/backup my databases hourly.
2) This is where software tools like MacroExpress really really really shine. I wrote a marco to disable the delete key when the Q:\ drive window is open. I attached a screen paste.

Once again, thanks for sharing.

No argument with your first point. I do have multiple backups of my data.

Your second suggestion probably won't work for me, for

1) last time I tried, MacroExpress had some unicode-related issues.
2) while I do use other similar utilities, disabling the Del key isn't going to be enough for me, for I use the toolbar button (in Directory Opus or XYplorer) to delete files quite often.

I think it's not a big issue for me for I have always reserved drive letter D for my main data partition. As long as I can put all my .urd files in one permanent location on D:, I should be able to avoid the issue of missing cross-links. And even if for some reason they need to be re-located, creating a symlink in its original location shouldn't be hard. At least it should work till Kinook solves the problem on their end.


All times are GMT -5. The time now is 07:55 AM.


Copyright 1999-2019 Kinook Software, Inc.