By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Junction handling in Win7

I've been using TCC LE 13 x64 to help configure a new Windows 7 installation (my first). One priority was to move the Users directory tree to D:\Users (ie: to another drive). This was reasonably simple to do from Safe Mode (though, being my first time, I made it more complicated than necessary). But the usual set of junctions were not copied, so I had to recreate them manually. In order to do so, I had to first find the junctions in the renamed C:\UsersOld. This is where I noticed some problems.

TASK: Locate all Junctions and Symbolic Links in the current directory and all subdirectories.

ATTEMPT 1: dir /aL /s /m
Run from a user account, this works nicely.
However, run from an administrator account, DIR starts to traverse the D:\Users\Default\AppData\Local\Application Data\ loop. It doesn't hang, but it does provide a lot of useless output.

ATTEMPT 2: ffind /a:L /s *
Again, this works great from a Standard User account, but follows every junction and loop in an Administrator account, until it realises and gives up.

ATTEMPT 3: for /r /a:L %dn in (*) echo %dn
This time, FOR refuses to look inside hidden directories, so the three junctions in D:\Users\<username>\AppData\Local\ are not shown. I thought /a: would normally tell FOR /R to traverse hidden directories, but it doesn't seem to. And, in any case, /a:L would overwrite this function. On the plus side, FOR /R also doesn't traverse junctions.

If I use a Standard User, I can't view the entire C:\UsersOld (or D:\Users) directory tree; I can only see the current use.
If I use an Administrator, both DIR /S and FFIND /S follow junctions (and hence loops).
If I use FOR /R, I won't see junctions within hidden directories.

1. Add a .INI command (I couldn't find one) that prevents all /S-modified commands from traversing junctions.
2. Add switches to DIR and FFIND to enable/disable the traversing of junctions.
3. Add a switch to FOR /R that allows hidden directories to be traversed (but not junctions).

Since Junctions are now quite fundamental to Windows 7, and affect the fundamental behaviour of these essential commands, I suggest these enhancements need to be included in the LE version of your products as well as the enhanced versions.

Thanks for your time. I hope this has been useful, and timely.

PS: I've bought previous versions of your products, because I wanted the functionality that was included. However, at the moment TCC LE seems to be perfectly sufficient for my needs. And my temporarily-tight budget doesn't stretch to surplus expenditure! :)
It has been available for many versions. The option /NJ does not traverse junctions/symlinks. It is available in almost every command which goes through a directory tree.
Well, don't I look silly!

Thanks for pointing this out, Steve.

While I'm here, I noticed that when you go Back in the TCC Help system, it takes you to the top of the page rather than to the point where you were (eg: half-way down the list of variable functions). Is there any way to change this behaviour? Or is it worth suggesting as an improvement? How about Favourites in the Help system?