Page 1 of 1

Behaviour in the presence of links (junctions, symlinks, ...

Posted: 2010-03-28, 20:04 UTC
by kovesp
Currently I don't see a way of preventing TCMD from descending into linked directories. In particular, when I have a structure like this:

Code: Select all

C:\Drives\
   C->C:\
   E->E:\
then an infinite recursion results on a search. Yes I know, that there is a way to search only selected directories. but that would be tedious in this case.

I am requesting a "follow links" check box in the search dialogue (and possibly also the copy/move dialogue and perhaps others that I can't think of right now) to control this. This is the better solution, but if this is too much to ask, then I am also OK with a global option setting or menu command.

Posted: 2010-03-28, 21:31 UTC
by Balderstrom
Although recursion prevention could be useful, a global [x] don't parse junctions option would be less so.

I'd much rather see improvement to the IgnoreList functionality -- but I wont derail this thread with that detail.

Posted: 2010-03-29, 02:17 UTC
by kovesp
Although recursion prevention could be useful, a global [x] don't parse junctions option would be less so.
Oh, I agree completely! I was just thinking that even a global option is better than nothing as a last resort, and is easier to implement than having to modify a large set of dialogue boxes.

Posted: 2010-03-29, 04:31 UTC
by MVV
You should check for recursions yourself if you're using junctions. BTW, in TC search dialog you may see "Search in subdirectories:" combo box where you may limit search depth - it will protect from infinite loops caused by reparse points.

BTW I don't see any reason to create junctions and to ignore them while searching later.

Posted: 2010-03-29, 13:42 UTC
by X-Byte
I support the suggested option "[x] don't parse junctions", but separately for the search, copy and move (?) dialog.

Comes in handy, if you have symlinked big archive harddisks into your "normal" harddisk structure and you want to ignore them, while searching the rest.

Posted: 2010-03-29, 21:49 UTC
by kovesp
MVV wrote:BTW I don't see any reason to create junctions and to ignore them while searching later.
Depends on what you are doing. The structure I created above is for accessing multiple drives from a different machine (c:\Drives is shared).

In some cases I want to search for stuff on the drive without recursion, traversal to other drives, or getting multiple hits for the same files.

Posted: 2010-03-30, 10:01 UTC
by MVV
kovesp wrote:In some cases I want to search for stuff on the drive without recursion, traversal to other drives, or getting multiple hits for the same files.
You may use special ignore list for such operation. Currently TC doesn't support internal command to change ignore list but you may use some external tool to change corresponding INI parameter and switch ignore list off and on then using command cm_SwitchIgnoreList - TC will use new ignore list. After searching you may switch ignore list back.

Posted: 2010-03-30, 11:24 UTC
by kovesp
MVV wrote:Currently TC doesn't support internal command to change ignore list but you may use some external tool to change corresponding INI parameter and switch ignore list off and on then using command cm_SwitchIgnoreList - TC will use new ignore list. After searching you may switch ignore list back.
Hmm... So first I write (say) a Perl script to find all the links on the volume (these do change after all). Then the script changes the ini file.
Now I can search in TCMD. The disk has been traversed twice. I might as well write the Perl script itself to do the search. Or just use the unix (cygwin) find command which supports the "don't traverse links" function.

Posted: 2010-03-30, 11:31 UTC
by MVV
You may keep ignore list between searches - I don't think you so frequently add new junctions - so you don't need to change it before each search. :wink:

Posted: 2010-03-30, 11:38 UTC
by kovesp
True. But will I remember that I've changed the links? No: senility is setting in ... :?