Submitted by Tom on 2009/03/12 13:13
thought I'd start a thread about
  • file links
  • situation when the linked files are moved
  • relative paths
  • plan for the future related to this topic 
reason being I'm in the situation where I have to (or think it's best to) reorganise files and folders due to a major restructuring of a job (the details arent important really)
so I have to make a decision about how I proceed.
 
1.   if links are broken by, say, moving a folder, is there a method of changing/correcting links en masse 
Example: 20 files from one folder linked in grid in IQ. Folder gets moved ..
Answer to example: well it looks like if I simply change the FilePath field * en masse that this will work - this in spite of the fact that the path in the item link appears to be wrong.  [edit] worked once but not the second attempt ! will try again [edit]
* The FilePath field contains the path to the parent folder.
 
1.1.  so I guess the question now is if it is planned to find links for moved files in general ?
 
Autoupdating links: If the linked file is in the YourFile.sndb.Files folder, then any links which cannot be resolved (moved, on a different computer, etc) will search in that folder and if resolved, will update the FilePath field accordingly. This is a great way to simulate file embedding. Simply copy your sndb file and the associated subfolder to a portable drive and your links will remain functional
-
I think I understand this - I wouldnt want to (or possibly even be able to) put all the files into that folder, but I'm wondering could there be some way of making a file (txt / csv?) that would have old paths and new paths and if this was placed in the YourFile.sndb.Files folder and that IQ could read it and correct paths.
 
2..  is anyone here actually using relative links? If so could you tell us about your experience
 
> If you move both the SQLNotes file and the linked files, the links will still work (that's the idea behind relative links). To really work well however, the linked files must be under the SQLNotes file. If they are like ..\otherfolder\myfile.txt, then you'll need to move otherfolder too.
My situation is complicated by the fact my db file is in a dropbox folder ... oh dear
 
It's that I want to organise things now so as they can last without too much messing around in the future. Gives me a headache it does.
Any comments, suggestions, or opinions welcome

Comments

[quote=Tom]
1.   if links are broken by, say, moving a folder, is there a method of changing/correcting links en masse 
Example: 20 files from one folder linked in grid in IQ. Folder gets moved ..
Answer to example: well it looks like if I simply change the FilePath field * en masse that this will work - this in spite of the fact that the path in the item link appears to be wrong.  
* The FilePath field contains the path to the parent folder
[/quote]
 
worked once but not the second attempt ! will try again 
again could anyone with any experience here please comment!
thanks,

Pierre_Admin

2009/03/12 13:53

In reply to by Tom

Make sure the new FilePath is correct. The order when double-click on an item is:
  1. Check if the item text corresponds to a valid file. If yes, open it
  2. Check filepath and filename. If it exist, open it

Tom

2009/03/13 04:45

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Make sure the new FilePath is correct. The order when double-click on an item is:
  1. Check if the item text corresponds to a valid file. If yes, open it
  2. Check filepath and filename. If it exist, open it
[/quote]
 
new FilePath is correct - still not working - will try a couple of more tests later
unfortunately I deleted the first test (which was only with one file but it seemed to work but it was also very quickly done with possibility of some mistake there) 
 
Just tried another few files and it didnt work again, so I can say this is not working for me anyway Pierre 
I made sure to add the back-slash at the end of the FilePath - cant see that there's anything else I could have done wrong ...
 
 

jan_rifkinson

2009/03/13 08:02

In reply to by Tom

Personally, I've found the entire file linking system to be a bit squirrely here. Half the  time, clicking on a file link does nothing to the point where I'm hesitant to link any local files via IQ. OTOH, I'm probably missing something.
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-1

Tom

2009/03/13 10:13

In reply to by jan_rifkinson

[quote=jan_rifkinson]
Personally, I've found the entire file linking system to be a bit squirrely here. Half the  time, clicking on a file link does nothing to the point where I'm hesitant to link any local files via IQ. OTOH, I'm probably missing something[/quote]
my experience has been very positive - I dont link a huge variety of filetypes but I haven't had any problems opening them or anything
Is it with particular filetypes you'rehaving problems ?

Tom

2009/03/13 13:41

In reply to by Tom

[quote=Tom]
[quote=Pierre_Admin]
Make sure the new FilePath is correct. The order when double-click on an item is:
Check if the item text corresponds to a valid file. If yes, open it
Check filepath and filename. If it exist, open it
[/quote]
new FilePath is correct - still not working - will try a couple of more tests later
unfortunately I deleted the first test (which was only with one file but it seemed to work but it was also very quickly done with possibility of some mistake there)

Just tried another few files and it didnt work again, so I can say this is not working for me anyway Pierre
I made sure to add the back-slash at the end of the FilePath - cant see that there's anything else I could have done wrong ..
[/quote]

any chance you could have a look at this Pierre ?
-
I did a third test without success

 

Pierre_Admin

2009/03/13 14:39

In reply to by Tom

1 question:
 
What is displayed in the item:
  1. filename: updating filepath works here
  2. path+filename: updating filepath works here, even though the item path is the old path
  3. hyperlink to the file: updating filepath and clicking the hyperlink does not work, but double-click on the # column works
Does this help?
 

Tom

2009/03/13 14:53

In reply to by Pierre_Admin

[quote=Pierre_Admin]
1 question:
 
What is displayed in the item:
  1. filename: updating filepath works here
  2. path+filename: updating filepath works here, even though the item path is the old path
  3. hyperlink to the file: updating filepath and clicking the hyperlink does not work, but double-click on the # column works
Does this help?[/quote]okay I have behaviour three 
which I didnt realise cause I always hide the # column
(Maybe I hadnt said they were hyperlinks)
 
That's a relief 
 
Any chance you could set it up so as (hyper)linked files open when clicking on the item field? (I'll probably wait to make the move until that's possible - I've been spoiled now by that single click - couldnt go back :p)
 
have a good weekend if I dont see ye before monday  

jdonlan

2009/03/13 14:44

In reply to by Tom

I have an upcoming system transfer of my own and this thread prompted me to try a test out for myself. I can confirm Tom's findings in that even though the FilePath is altered to new, valid location the item link defined by <a href= (filelocation)...> does not change dynamically.
John

Pierre_Admin

2009/03/13 14:53

In reply to by jdonlan

> item link defined by <a href= (filelocation)...> does not change dynamically
 
This is correct. The <a href-... is a hardcoded hyperlink and is not updated if filepath is changed. It is a non-trivial task to check all text fields (in all items for that manner) for a match on a href-... when the FilePath is changed and update all refs.
 
A much better long term solution is the use of file shortcuts which are updated by the OS as they are moved. This is easy to implement and is planned. (so the hyperlink would point to the shortcut, not to the actual file). Not sure how this will work with network files however...
 
Another solution is to create a function to update the item text on filepath / filename change. This can be done with the current version. I can supply the function if desired.
 
Any better solution? Suggestions are welcomed

jdonlan

2009/03/13 15:55

In reply to by Pierre_Admin

Pierre,
Is it possible for the href link to use the FullFileName or FilePath and FileName as some sort of parameter? this would make it dynamic when they are changed and keep the link updated automatically.
John

Pierre_Admin

2009/03/13 17:29

In reply to by jdonlan

Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away
 
[edit] The same with [URL] (href=[URL])

Tom

2009/03/15 13:59

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away
 
[edit] The same with [URL] (href=[URL])
[/quote]
 
sounds great - including the "right away" bit  

jan_rifkinson

2009/03/16 08:47

In reply to by Tom

[quote=Pierre_Admin]
Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away
 
[edit] The same with [URL] (href=[URL])
[/quote]
 
This is a little over my head. Does this mean local paths will become dynamic so if file is moved via explorer a link in IQ will be updated as well?
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-1

Tom

2009/03/16 09:25

In reply to by jan_rifkinson

[quote=jan_rifkinson]
[quote=Pierre_Admin]
Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away
 
[edit] The same with [URL] (href=[URL])
[/quote]
 
This is a little over my head. Does this mean local paths will become dynamic so if file is moved via explorer a link in IQ will be updated as well
[/quote]
 
no, but that is planned too.
Pierre says above:-
> A much better long term solution is the use of file shortcuts which are updated by the OS as they are moved. This is easy to implement and is planned. (so the hyperlink would point to the shortcut, not to the actual file). Not sure how this will work with network files however...
 
This current thingy just means we can manually update link so that the one-click link still works (wasnt working when I just changed the FilePath field)

jdonlan

2009/03/16 08:24

In reply to by Pierre_Admin

 Guess Friday 13th was one of my better days - thanks Pierre!
John

Tom

2009/03/16 09:20

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away 
[/quote]
 
but dont use FileFullName !
 
if possible use FilePath and FileName:
 
then multiple files from one folder that are moved can be changed en masse - just change the FilePath. Otherwise (with FileFullName) each item will have to be changed individually

Pierre_Admin

2009/03/16 10:36

In reply to by Tom

FileFullName is a dynamic (and read-only) field, always composed of FilePath and FileName.
 
The UI I'm working on looks like this (will show on file drag-drop):
 
 
Comments anyone?

jan_rifkinson

2009/03/16 10:56

In reply to by Pierre_Admin

What is / does 'File reference fields'
 
Why would someone use this UI for item text that had 'no hyperlink'?
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-1

Pierre_Admin

2009/03/16 11:06

In reply to by jan_rifkinson

Right now, when you drag-drop a file to the grid, at least 3 fields are filled:
  • FileRef is checked
  • FilePath gets the path
  • FileName gets the name
It is proposed to be able to drop the file and be able use:
  • The URL field, which is typically displayed as a hyperlink. Can hold a web URL of a reference to a file
  • The HTML pane. Clicking on the item would display the file in the HTML pane (htm, mht, doc, xls, jpeg, png, and just about anything that  IE can display (and eventually edit)
You can open the linked file by double-click on the anywhere on the item (much like Ecco could launch a file, if the item had the correct format).
 
In addition, the grid supports in-text hyperlinks. This allows single-click launch, multi-file link, link to other items, etc

Tom

2009/03/16 12:21

In reply to by jan_rifkinson

[quote=jan_rifkinson]
What is / does 'File reference fields'
 
Why would someone use this UI for item text that had 'no hyperlink'
[/quote] well it's used only on drag n drop of a file into grid - I personally would always choose hyperlink but maybe for some reason some wouldnt, or wouldnt want it in the item field
 
Re File Reference fields - these are currently hyperlink fields by default when you drag-drop file - can be handy..

Tom

2009/03/16 12:23

In reply to by Pierre_Admin

so,
 
1)  in order to replicate current drag-drop of a file I would simply select FileName (top right in image)
 
2)  Does "Item hyperlink" mean hyperlink in the item field or in item in general?
 
3)  is "File link saved to: ..." a hyperlink?  [edit]  answered in previous post  [/edit]
 
4)  I think "Drop item as ..." is not necessary - just more work for me really having to manually choose one - if item doesnt go exactly where I plan, I can always move it.
But if others (or you) want it, it wouldnt bother me!
 
5)  why wouldnt you simply have dynamic by default? (Well I guess you can, but I'm not sure why one would choose static)
 
6)  if someone wanted to add text as a suffix to the filename in the item field (something I would do more than prefix) would that be possible (and would you actually go so far!)
e.g.
Item text                    FilePath        Item text  ________
[_____________]   +  File Name +  [_________________]
EDIT/ to #6) call it 6a
6a)  would this additional text become part of the link in a hyperlink or be shown outside of the <a ..etc..a>

jdonlan

2009/03/16 12:46

In reply to by Tom

Re: 4 (Drop Item as..) would be really useful! (sorry Tom!)
 
Re 5: Setting dynamic as a default would save a click in most cases I think.
 
John

Pierre_Admin

2009/03/16 13:11

In reply to by jdonlan

As usual, all settings would be saved, so the next time you drop a file, the previous settings will be applied.

Tom

2009/03/16 17:38

In reply to by Pierre_Admin

[quote=Pierre_Admin]
As usual, all settings would be saved, so the next time you drop a file, the previous settings will be applied.
[/quote]
 
You could put in an advanced label (you wouldnt even have to make it drop down) to indicate to people that they really dont have to worry about these options unless they want to get in there and mess around  
 
something like this as default ?
 
 
I suggest this cause I think new users being confronted with your one above could be fairly intimidated

Tom

2009/03/16 13:28

In reply to by jdonlan

>  Re: 4 (Drop Item as..) would be really useful!
 
Re 4 (again!)  if nothing was selected here (if no selection allowed) then follow drag and drop direction of where to place item -
that would offer the best of both worlds then 

Tom

2009/03/19 08:50

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Excellent idea! if href=[FileFullName] then will use that for the link. I'll implement that right away
 
[edit] The same with [URL] (href=[URL])
[/quote]has this been implemented in  pre-release#9 ?
 
If so, I'll give it a test run :-)

Pierre_Admin

2009/03/19 09:04

In reply to by Tom

not quite unfortunately. Expect an update very very soon...

Tom

2009/03/22 10:56

In reply to by Pierre_Admin

[quote=Pierre_Admin]
not quite unfortunately. Expect an update very very soon...
[/quote]that's in latest build (Version 0.9.24 Pre-release 10 build 2009-03-20 23:30:26)
 
unfortunately it's not working here - I click OK, nothing happens - doesnt seem to make any difference what I select
Cancel doesnt work either but [x] in the corner does and then a (hopefully) normal linked item is created
 
added to Mantis (674)

Tom

2009/06/03 17:56

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Closing in on this thread... Is the new File link UI working well? Comments... positive or negative are welcome[/quote]
 
mine has stopped showing - I see from that page that if I press Control it will show again - is this in options somewhere as well (the option to show it)?
if not (I couldnt find it but have problems seeing things at times!) it would be helpful at some stage.
 
Seems to be working perfectly here 

Pierre_Admin

2009/06/03 23:50

In reply to by Tom

>is this in options somewhere as well (the option to show it)?
 
Yes: Tools > Options > 1.3.6
 

Tom

2009/06/25 07:33

In reply to by Pierre_Admin

Re: option to show dialogue on drag/drop of file in grid[quote=Pierre_Admin]
> is this in options somewhere as well (the option to show it)?
 
Yes: Tools > Options > 1.3.
[/quote]that is in the section 'Modes' ( no idea what that means)
 
would it make sense to have it somewhere with 1.5.6 / 1.5.7 (Show open-with for links / Create h.link on drag/drop)
. . guess who's just been searching for it . . 

Armando

2009/06/03 23:33

In reply to by Pierre_Admin

Seems to work well here. Thanks !

markfoley

2009/06/04 04:34

In reply to by Pierre_Admin

Hi guys,
 
I'm late to the party on this one, but on the list of adding methods (new top level item, sub item etc) it skips the one that is probably most useful from my angle (may be possible but havent seen a method yet)
 
If I drop a file on an item, I normally want it to be a field I can click on in that items row to bring up the relateed file.  Eg if a task was "review functional spec" I would drag and drop the word file on top of it, a little 'W' icon or similar would tell me there is a related file which I click on to open it.  Can do the same with URL's.
 
See attached file of my ToDoList screen, where I've setup a list of useful files and links.  I don't need to see the path or filename, just a little icon to click on.
 
The main point I guess is that it would be a field of the item, not a separate item.
 
Any method of getting close to this or could we consider adding it?
 
cheers

Tom

2009/06/04 07:14

In reply to by markfoley

[quote=markfoley]If I drop a file on an item, I normally want it to be a field I can click on in that items row to bring up the relateed file.  Eg if a task was "review functional spec" I would drag and drop the word file on top of it, a little 'W' icon or similar would tell me there is a related file which I click on to open it.  Can do the same with URL's.[/quote]
something along these lines:
if the dialog box had -
  • Item Text [       ]  + File icon / or Link icon
  • File Link Saved to:- [drop down list of fields]   and
  • Drop item as:- Current item
?
sounds very good to me  :-)
I make it sound easy Pierre, dont I  !
 

Armando

2009/06/05 13:02

In reply to by Pierre_Admin

Seems quite nice to me... :)

gregory

2009/06/16 01:25

In reply to by Armando

In general the new file linking in 0.9.24 seems great to me, especially the drag and drop.
 
<ASIDE> I am using this in conjunction with the very nice file manager I use (Directory Opus). In Directory Opus, you can (among a myriad other excellent functions) keep a filtered list of recently-changed files. So when I'm doing something which generates a lot of changed or new files which I will subsequently want to be able to find again and use, I select and copy the names of the changed files and drop them into IQ. Result: I can easily manage the set of resources associated with a process or project, which previously I did using a horribly-complicated Excel spreadsheet with some moderately serious VBA incorporated within it. </ASIDE>
 
However, I'm a little bit uncertain how best to use file linking for existing references.
 
My main IQBase is an import from Ecco. I have a lot of file references which follow the two Ecco patterns, in which
  1. either an item can be a FullFileName in IQ terms, such as
    D:\R\Mod\IS443E Management Information Systems\Situational Applications Builder Evaluation Criteria.xls
  2. or it can be slightly differently formatted, as in
    Application Space.vsd    (D:\Q\KIMSPAG\CITSA 2009 - Evaluating Situational Applications Builders)
In either case, Ecco recognises the item as having the form of a file link and in particular you can double-click to launch the item.
 
IQ does not automatically recognise file references. So I guess what I ought to do is to write a UDF associated with new and amended Items which looks to see whether they look like one of the two Ecco patterns, set the FileName and FilePath fields, also explicitly set an (un-write-protected) FullFileName (since this is only set automatically to FilePath&"\"&FileName as part of a drag-and-drop?) and then, hey presto!, I can launch the file using the FullFileName hyperlink.
 
Alternatively, IQ could perhaps be enhanced to spot file references when items which look like filenames are imported, added or amended, offering to set up the file link fields?
 
Yet another approach would be to have the same behaviour as in Ecco, which is that double-clicking an item which is a full file name launches it.
 
What are your views and/or advice, good people?
 
Mark Gregory, Rennes, France - GMT +1/+2; EST +6

Armando

2009/06/16 12:07

In reply to by gregory

> Alternatively, IQ could perhaps be enhanced to spot file references when items which look like filenames are imported, added or amended, offering to set up the file link fields?
 
I think it's a good idea. I wonder how would that work when you have lot's of these (importation). IQ would ask only once, for all imported items (seems better than ask for each one of them, depending on the quantity...) ?