Page 1 of 3

OT: Deleting Junctions

Posted: 15 Apr 2012 20:42
by admin
Today I discovered the hard way that when you terminally delete (no recycle bin) a junction to folder X, then all contents of folder X are removed terminally as well (but not the folder itself)! This does not happen when you delete a junction to recycle bin.

Did you know that?

(XP SP3)

PS: Just to make sure, this is, of course, not an XYplorer property but a Windows property. It happens with any file manager.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 14:40
by DmFedorov
http://en.wikipedia.org/wiki/NTFS_junction_point
Observed effects
Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete.
If the junction point is sent to the Recycle Bin, the targeted files will look safe, but will be deleted when the Recycle Bin is emptied.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 17:58
by admin
DmFedorov wrote:http://en.wikipedia.org/wiki/NTFS_junction_point
Observed effects
Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete.
If the junction point is sent to the Recycle Bin, the targeted files will look safe, but will be deleted when the Recycle Bin is emptied.
Looks extremely dangerous to me. So apparently creating a junction to some folder is an irreversible operation: you cannot undo it without deleting the contents of the folder. Not a comfortable situation.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 18:33
by nas8e9
FYI: Sysinternals has a junction utility which seems able to delete just the junction.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 18:42
by PeterH
admin wrote:
DmFedorov wrote:http://en.wikipedia.org/wiki/NTFS_junction_point
Observed effects
Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete.
If the junction point is sent to the Recycle Bin, the targeted files will look safe, but will be deleted when the Recycle Bin is emptied.
Looks extremely dangerous to me. So apparently creating a junction to some folder is an irreversible operation: you cannot undo it without deleting the contents of the folder. Not a comfortable situation.
Extremely dangerous: that's no question.

But looking at the wiki-page DmFedorov refered to, under: Observed effects / Windows 2000/XP/2003 / Command Prompt (cmd.exe) (in contast to windows explorer) you find info about safely deleting junction points.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 19:11
by admin
PeterH wrote:
admin wrote:
DmFedorov wrote:http://en.wikipedia.org/wiki/NTFS_junction_point
Observed effects
Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete.
If the junction point is sent to the Recycle Bin, the targeted files will look safe, but will be deleted when the Recycle Bin is emptied.
Looks extremely dangerous to me. So apparently creating a junction to some folder is an irreversible operation: you cannot undo it without deleting the contents of the folder. Not a comfortable situation.
Extremely dangerous: that's no question.

But looking at the wiki-page DmFedorov refered to, under: Observed effects / Windows 2000/XP/2003 / Command Prompt (cmd.exe) (in contast to windows explorer) you find info about safely deleting junction points.
Ah, yes! I'll add the functionality to the next version. :D

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 20:24
by kodyman
For a non-programmer/coder/scripter like myself, until the next version, is there anything I should be careful not to do that could fall into this and I loose files or folders that I don't have a back-up copy of yet?
For instance I have set up a catalog that one group is set up as a simple program launcher. And in another a list of Excel files that launch Excel and load. Is this being done by a junction discussed here?

My learning curve of what xyp can help me accomplish as I "play" & try different things new to me is slowly on the rise. Usually I "play" using test folders and files. But I have replaced some of these with actual usable files when I find I like what it does. Catalog for instance. Just don't want to inadvertently loose anything.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 20:30
by admin
kodyman wrote:For a non-programmer/coder/scripter like myself, until the next version, is there anything I should be careful not to do that could fall into this and I loose files or folders that I don't have a back-up copy of yet?
For instance I have set up a catalog that one group is set up as a simple program launcher. And in another a list of Excel files that launch Excel and load. Is this being done by a junction discussed here?

My learning curve of what xyp can help me accomplish as I "play" & try different things new to me is slowly on the rise. Usually I "play" using test folders and files. But I have replaced some of these with actual usable files when I find I like what it does. Catalog for instance. Just don't want to inadvertently loose anything.
No worries. Junctions have nothing to do with the Catalog or with any internal functionality of XYplorer. The only way to create junctions in XYplorer is via Edit / Paste Special / Paste As Junction(s). In other words: it won't happen without your knowledge. Also Junctions are marked by an "arrow" icon overlay in Tree and List.

Re: OT: Deleting Junctions

Posted: 16 Apr 2012 20:58
by kodyman
Thanks!

Edit: BTW... Is there a command to list, show a catalog, of all of the stock xyp icons and what they refer to?
I've looked & if it's there missed it.

Re: OT: Deleting Junctions

Posted: 17 Apr 2012 08:20
by admin
kodyman wrote:Thanks!

Edit: BTW... Is there a command to list, show a catalog, of all of the stock xyp icons and what they refer to?
I've looked & if it's there missed it.
No, but you can get a list like the following (but with icons) in the Customize Toolbar dialog when you call this dialog from a toolbar user button:

Code: Select all

Separator
Address Bar Go [go]
Back [back]
Forward [fore]
Up [up]
Recent Locations [mru]
Hotlist [hotlist]
MyComputer [myco]
Drives [drives]
Browse Network [browsenetwork]
Refresh [refresh]
Auto-Refresh [autorefresh]
Suspend Auto-Refresh [refreshsus]
Stop [stop]
Find Files [find]
Properties [shellprops]
Properties Tab [props]
Copy Path/Name [copypath]
Open With [openwith]
Preview [preview]
Full Screen Preview [previewfull]
Quick File View [qfv]
Enable Color Filters [cofi]
Favorite Folders [favs]
Favorite Files [favfiles]
Labels [labels]
Find by Label [findlabel]
Add Tags [tagsadd]
Set Tags [tagsset]
Remove Tags [tagsrmv]
Find by Tags [tagsfind]
Undo [undo]
Redo [redo]
Cut [cut]
Copy [copy]
Paste [paste]
Edit Files in Clipboard [clip]
Move To... [moveto]
Copy To... [copyto]
Backup To... [backupto]
Go to Last Target [lasttarget]
Go to Previous Location [goprev]
Rename [rename]
Delete [del]
Nuke [nuke]
Wipe [wipe]
Enable Background Processing [bfop]
Queue File Operations [queue]
Use Custom Copy [cucopy]
Map Network Drive [netmap]
Disconnect Mapped Drive [netunmap]
Command Prompt [dosbox]
Show Navigation Panel [hidenav]
Show Tree [treeshow]
Show Catalog [cat]
Dual Pane [dp]
Toggle Active Pane [dp12]
Move to Other Pane [dpmoveto]
Copy to Other Pane [dpcopyto]
Sync Scroll [syncscroll]
Show Info Panel [panelshow]
Toggle Wide Info Panel [hightree]
Last/Min Size Info Panel [panellast]
Max/Min Size Info Panel [panelmax]
Sort By [sort]
Views [views]
Details View [viewdetails]
List View [viewlist]
Thumbnails View [viewthumbs]
Branch View [flatview]
Zoom In [zoomin]
Zoom Out [zoomout]
Configuration [conf]
Save All Settings [savesett]
Exit without Saving [exitnosave]
Manage Commands [udc]
Customize Keyboard [cks]
Folder View Settings [fvs]
Mini Tree [minitree]
List Management [lstmgmt]
New Folder [newfolder]
Calculate Folder Sizes [calcfosi]
Home [home]
New Tab [newtab]
Close Tab [closetab]
Lock Tab [locktab]
Tab List [tablist]
Tabsets [tabsets]
Show Hidden Items [showhidden]
Show System Items [showsystem]
Hide Folders in List [showfolders]
Toggle Visual Filter [visualfilter]
Sticky Selection [sticky]
Step Mode [steps]
All Drives (Group) [{drives_all}]
Available Drives (Group) [{drives_avl}]
Hard Drives (Group) [{drives_fix}]
Removable Drives (Group) [{drives_rem}]
Network Drives (Group) [{drives_net}]
CD-ROM Drives (Group) [{drives_cdr}]
Drive A: [drive_A]
Drive B: [drive_B]
Drive C: [drive_C]
Drive D: [drive_D]
Drive E: [drive_E]
Drive F: [drive_F]
Drive G: [drive_G]
Drive H: [drive_H]
Drive I: [drive_I]
Drive J: [drive_J]
Drive K: [drive_K]
Drive L: [drive_L]
Drive M: [drive_M]
Drive N: [drive_N]
Drive O: [drive_O]
Drive P: [drive_P]
Drive Q: [drive_Q]
Drive R: [drive_R]
Drive S: [drive_S]
Drive T: [drive_T]
Drive U: [drive_U]
Drive V: [drive_V]
Drive W: [drive_W]
Drive X: [drive_X]
Drive Y: [drive_Y]
Drive Z: [drive_Z]
C:\ [ctb1]
Open with Photoshop [ctb2]
Open with EmEditor [ctb3]
Various Mini Trees [ctb4]
Autosize Columns Now [ctb5]
Item Store [ctb6]
E:\Test\funstuff\ [ctb7]
C:\Programme\IcoFX 1.5\IcoFX.exe [ctb8]
E:\Droplet\Droplet_ImageSize25p_to_E-Test.exe [ctb9]
E:\Droplet\Droplet_ImageSize50p_to_E-Test.exe [ctb10]
User Button #11 [ctb11]
User Button #12 [ctb12]
User Button #13 [ctb13]
User Button #14 [ctb14]
User Button #15 [ctb15]
User Button #16 [ctb16]
User Button #17 [ctb17]
User Button #18 [ctb18]
User Button #19 [ctb19]
User Button #20 [ctb20]
User Button #21 [ctb21]
User Button #22 [ctb22]
User Button #23 [ctb23]
User Button #24 [ctb24]
User Button #25 [ctb25]
User Button #26 [ctb26]
User Button #27 [ctb27]
User Button #28 [ctb28]
User Button #29 [ctb29]
User Button #30 [ctb30]
User Button #31 [ctb31]
User Button #32 [ctb32]

Re: OT: Deleting Junctions

Posted: 17 Apr 2012 08:37
by admin
admin wrote:Today I discovered the hard way that when you terminally delete (no recycle bin) a junction to folder X, then all contents of folder X are removed terminally as well (but not the folder itself)! This does not happen when you delete a junction to recycle bin.

Did you know that?

(XP SP3)

PS: Just to make sure, this is, of course, not an XYplorer property but a Windows property. It happens with any file manager.
FYI, I just found out that this is true only for XP. Vista/Win7 has fixed the issue.

Re: OT: Deleting Junctions

Posted: 20 Apr 2012 12:32
by Cynic
Link Shell Extension fixes XP's mishandling of junctions.

Re: OT: Deleting Junctions

Posted: 29 May 2012 12:59
by PeterH
admin wrote:
PeterH wrote:
admin wrote:
DmFedorov wrote:http://en.wikipedia.org/wiki/NTFS_junction_point
Observed effects
Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete.
If the junction point is sent to the Recycle Bin, the targeted files will look safe, but will be deleted when the Recycle Bin is emptied.
Looks extremely dangerous to me. So apparently creating a junction to some folder is an irreversible operation: you cannot undo it without deleting the contents of the folder. Not a comfortable situation.
Extremely dangerous: that's no question.

But looking at the wiki-page DmFedorov refered to, under: Observed effects / Windows 2000/XP/2003 / Command Prompt (cmd.exe) (in contast to windows explorer) you find info about safely deleting junction points.
Ah, yes! I'll add the functionality to the next version. :D
It seems I misunderstood your words :(

Deleting a junction point (WXP) in XY still also deletes all contents of the destination directory - but you added a command "Junction/Delete Junction..."

That with WXP all contents of a deleted junction point is also deleted seems to be a (MS) bug to me. (Also to MS - so they changed that for Vista and W7.)
I don't think it makes any sense, and it is very dangerous! And I think nobody ever will need or want this.

So wouldn't it be possible for XY to recognize the deletion of a junction point, and implicit change it to the function of "Junction/Delete Junction...", i.e. delete the junction point, but don't touch the contents of the destination directory?
(As far as I understand it's the same as LSE even does/changes for WinExplorer on WXP...)

Re: OT: Deleting Junctions

Posted: 29 May 2012 20:08
by admin
It's not my job to fix MS bugs. :)

Seriously, internally/silently changing system functions is not a good idea. For whatever reason, users might expect this behavior under XP, as buggy as it might seem.

Re: OT: Deleting Junctions

Posted: 29 May 2012 22:01
by PeterH
admin wrote:It's not my job to fix MS bugs. :)

Seriously, internally/silently changing system functions is not a good idea. For whatever reason, users might expect this behavior under XP, as buggy as it might seem.
I thought you made XY to fix the MS bug named windows explorer? :D

Everyone expecting this behaviour under XP can only come to one result: you must avoid it!
Everyone not expecting it (or forgetting to think of it) will lose data.
And if somebody complains then about XY, you will say it's not XY, it's MS :shock:

Or did I understand something wrong?

By the way: Link Shell Extension (see other thread) even changes it for WXP explorer - do you think they are wrong?
Junctions can be deleted by using the Delete commands from Explorer as usual, if Link Shell Extension is installed, because Link Shell Extension implements a so called CopyHook handler, which intercepts Explorers Delete commands, and thus fixes Explorers problems with junctions.
Link Shell Extension changes Delete commands from Explorer on Junctions to unlinking Junctions, and not deleting the content within a junction, which seems most logical.