| View previous topic :: View next topic |
| Author |
Message |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
Posted: Tue Aug 25, 2009 8:03 pm Post subject: [WDX] NTLinks plugin: Hardlinks and NTFS reparse points info |
|
|
I had wrote my own plugin for NTFS hardlinks and reparse points, it correctly processes symbolic links for files/folders and also has field for file index (useful for searching all hardlinks of particular file).
Last version information
Version no: 1.5.3.214 32/64
URL: NTLinks at wincmd.ru / NTLinks at totalcmd.net
Requirements: operating system Windows 2000 and above, Total Commander
Features:
+ gets file indexes and number and paths of hardlinks
+ gets target path for reparse points and real path for all objects
+ supports symbolic links (new in Windows Vista/7)
+ get/set target path for symbolic links and junctions
+ fastest hardlinks comparison (within same volume)
+ Unicode support
General information:
Plugin provides following content fields:
HLNK_Count - returns hard copies number for file. Each copy has its place in some directory within one partition. Changing file's contents or attributes (incl. permissions) reflects on all its hard copies because they have common file contents.
HLNK_Index - returns string that represents 64-bit integer index of file, this index is unique within partition for each file. All hard copies will have the same index, and you may find all copies by specifying this index (or only part of it, because index returned as string).
Obj_Type - returns "Dir" for usual folder, "File" for usual file and some of reparse point type for reparse points. If type of reparse point can't be determined (i.e. because of permissions), value "RP: N/A" returned.
RP_Target - returns target file/folder/drive reparse point points to. For volume mount points it's a path to drive root, for symlink it is a path to file (relative or absolute), for symlinkD and junction it is a path to folder. For other reparse points currently no target return (if you have info about it - that's good). If you're running Windows NT5 (2000), admin rights are required to correctly resolve first mount point if volume has no letter assigned (current mount point path returned else - it is a valid mount point too). You may choose between natural and symbolic output mode - in symbolic mode volume names for mount points are not resolved to mounted path names.
RP_IsValid - returns Yes when target folder/file/drive of reparse point is available (for example, if it's a mount point of DVD drive, target will be valid when correct CD/DVD is inserted, for junctions/symlinks path is valid if target object don't moved/deleted) or No otherwise.
Obj_RealPath - returns real path of FS object, expanding all reparse points (max 256 expands to avoid endless loops). You may choose between natural and symbolic output mode, as for RP_Target field.
Obj_RealSize - returns real size of a file (in case of symbolic link).
HLNK_Paths - returns paths of first 10 hard copies of the file, if available (all or N-th one, requires Windows Vista).
You may choose between natural and symbolic output mode - in symbolic mode volume names for mount points are not resolved to mounted path names, also relative targets of symbolic links are left as is. Each field return Unicode string for TC 7.50 and newer, and ANSI string for old TC versions.
Last edited by MVV on Sat Jul 21, 2012 4:19 am; edited 40 times in total |
|
| Back to top |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2248 Location: Russian Federation
|
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
Posted: Wed Aug 26, 2009 3:12 am Post subject: |
|
|
| Alextp wrote: | | Do you put it to totalcmd.net? |
Currently I had only finished its testing and trouble-correction (like one that mount point info function returns volune names in form "\??\Volume{e0b03d73-84f2-11de-bcf7-806e6f6e6963}\" but GetVolumePathNamesForVolumeName function expects it in the form "\\?\Volume{e0b03d73-84f2-11de-bcf7-806e6f6e6963}\" - I had wasted not one hour while understood why it returns error )...
So, currently this link is the one place where my plugin may be downloaded. If you like it, I'll think about putting it to totalcmd.net, wincmd.ru. Or to add some new reparse points detection (currently it gets targets for symlink, symlinkd, mount point, and junction). _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
Alextp Power Member


Joined: 16 Aug 2004 Posts: 2248 Location: Russian Federation
|
Posted: Wed Aug 26, 2009 3:50 am Post subject: |
|
|
| Ok, thanks. Hope you ll fix that issues. |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
|
| Back to top |
|
 |
Balderstrom Power Member


Joined: 11 Oct 2005 Posts: 2024
|
Posted: Wed Aug 26, 2009 9:37 pm Post subject: |
|
|
@MVV Know of any reason that your plugin would fail to install on Win2K? Error: | Quote: | Error loading plugin file!
The plugin probably needs some DLLs missing on your system. |
|
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
Posted: Wed Aug 26, 2009 11:45 pm Post subject: |
|
|
| Balderstrom wrote: | @MVV Know of any reason that your plugin would fail to install on Win2K? Error: | Quote: | Error loading plugin file!
The plugin probably needs some DLLs missing on your system. |
|
That's sad. My dll contains only clear code and standard Windows API function calls from kernel32.dll and user32.dll and no more stuff like MFC/CRT. Perhaps in Win2K's kernel32.dll some used function is missing. I'll try to find and install Win2K onto VM in order to check out this issue (or you may send me your kernel32.dll privately). _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
Postkutscher Power Member

Joined: 31 Mar 2006 Posts: 556
|
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
Posted: Thu Aug 27, 2009 10:40 pm Post subject: |
|
|
Thanks, I didn't thought about such enumeration. Let me improve it:)
New version 1.0.0.30: http://files.wyw.ru/3873189 (CRC32: 3A948968)
Removed import GetVolumePathNamesForVolumeNameW (plz test it on W2K)
Added HSM2, DFSR reparse points detection (but I don't know where to see anything except junction, MP and symlinks )
Last edited by MVV on Fri Aug 28, 2009 2:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
Postkutscher Power Member

Joined: 31 Mar 2006 Posts: 556
|
Posted: Fri Aug 28, 2009 9:52 am Post subject: |
|
|
| Thanks, MVV , it seems to work under W2k now. |
|
| Back to top |
|
 |
Clo Moderator


Joined: 02 Dec 2003 Posts: 5737 Location: Bordeaux, France
|
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
|
| Back to top |
|
 |
Postkutscher Power Member

Joined: 31 Mar 2006 Posts: 556
|
Posted: Fri Aug 28, 2009 3:12 pm Post subject: |
|
|
Docs, please  |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4543 Location: Russian Federation
|
Posted: Fri Aug 28, 2009 3:36 pm Post subject: |
|
|
| Postkutscher wrote: | Docs, please  |
Is it really necessary? All supported fields are visible in TC dialogs.
HLNK_Index - shows string that represents 64-bit integer index of file, this index is unique inside partition. So, all hard copies will have the same index, and you may find all copies by specifying this index (or only part of it, because index returned as string).
HLNK_Count - shows ammount of hard copies of file. Each copy has its place in some folder of drive, copy can't be situated on another partition. Changing file's contents or attributes (incl. permissions) reflects on all its hard copies because they have common file contents.
Obj_Type - returns "Dir" for usual folder, "File" for usual file and some of reparse point type for reparse points. If type of reparse point can't be determined, value "RP: N/A" returned.
RP_Target - shows target file/folder/drive reparse point points to. For volume mount points it's a path to drive root, for symlink it is a path to file (relative or absolute), for symlinkD and junction it is a path to folder. For other reparse points currently no target return (if you have info about it - that's good).
RP_IsValid - boolean value, returned 1/Yes/True when target folder/file/drive of reparse point is available (for example, if it's a mount point of DVD drive, target will be valid when correct CD/DVD is inserted, for junctions/symlinks path is valid if target object don't moved/deleted).
About reparse points types I can't say nothing (except mentioned above).  _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
Postkutscher Power Member

Joined: 31 Mar 2006 Posts: 556
|
Posted: Fri Aug 28, 2009 3:48 pm Post subject: |
|
|
Strictly speaking I would like to know about symlinks, they are the one not mentioned in NL_info docs
The second thing...the validity of reparse points is dependent on permissions of TC`s user. All RPs where I have no access are marked as not valid. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|