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


Joined: 04 Jul 2003 Posts: 1021 Location: Germany
|
Posted: Tue Jan 31, 2012 4:09 am Post subject: |
|
|
Couly you please add one field (or multiple fields/units) to display all the file names of a hard linked file. I found one example here: http://blogs.msdn.com/b/oldnewthing/archive/2011/07/20/10188033.aspx _________________ My plugins: Autodesk 3ds Max Preview, Blat Mailer, ImageMetaData (JPG Comment/EXIF/IPTC/XMP) , MATLAB MAT-file Viewer, SolidWorks Preview and more |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
Posted: Tue Jan 31, 2012 11:04 am Post subject: |
|
|
tbeu, thanks for idea, I've added such feature, please test it.
NTLinks 1.5.2.180 32/64
You can see all hardlinks in single string or get them one by one. Plugin allows to return first 10 items (with indexes 0-9), I think it is enough. _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
tbeu Power Member


Joined: 04 Jul 2003 Posts: 1021 Location: Germany
|
Posted: Tue Jan 31, 2012 1:22 pm Post subject: |
|
|
| MVV wrote: | | I've added such feature, please test it. | Wow, that was quick! Thank you! Cannot test on WinXPSP3  _________________ My plugins: Autodesk 3ds Max Preview, Blat Mailer, ImageMetaData (JPG Comment/EXIF/IPTC/XMP) , MATLAB MAT-file Viewer, SolidWorks Preview and more |
|
| Back to top |
|
 |
zeeko Junior Member

Joined: 21 Feb 2009 Posts: 20
|
Posted: Tue Jan 31, 2012 3:28 pm Post subject: |
|
|
MVV, thanks for the great feature.
It works on Windows7 (TC8B17a x64 and 7.56a).
Is it possible to have a custom separator for file names? LineFeed (\n) separator would be great for tooltips (each file name in the new row). |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
Posted: Tue Jan 31, 2012 11:38 pm Post subject: |
|
|
| tbeu wrote: | | MVV wrote: | | I've added such feature, please test it. | Wow, that was quick! Thank you! Cannot test on WinXPSP3  |
Yes, unfortunately XP doesn't provide similar API, so this field doesn't work here (the only way to find hardlinks on XP is to copy file index and search all files with same index within whole drive). And I need to link theese functions dynamically to keep backward compatibility.
| zeeko wrote: | | Is it possible to have a custom separator for file names? LineFeed (\n) separator would be great for tooltips (each file name in the new row). |
I've tried "\n" and "\r\n" first of all, but TC replaces them with spaces and wraps long lines itself, it looks quite ugly. So I think comma is the best of the rest.
But you can use construction like [=ntlinks.HLNK_Paths.0]\n[=ntlinks.HLNK_Paths.1]\n[=ntlinks.HLNK_Paths.2]... to see any number of items on separate lines (if the field is empty, empty line will be shown). _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
zeeko Junior Member

Joined: 21 Feb 2009 Posts: 20
|
Posted: Wed Feb 01, 2012 5:55 pm Post subject: |
|
|
Thanks for the tip!
Is there a way to display the size of symbolic link target file?
tc.size displays 0 bytes for symbolic link size, and I can't find a way to display target file size in the tooltips. |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
|
| Back to top |
|
 |
zeeko Junior Member

Joined: 21 Feb 2009 Posts: 20
|
Posted: Fri Feb 03, 2012 4:45 pm Post subject: |
|
|
| I did some search how to get target file size. There is a flag in CreateFile function responsible for symlink processing. If dwFlagsAndAttributes param contains FILE_FLAG_OPEN_REPARSE_POINT value, functions GetFileSize, GetFileSizeEx, GetFileInformationByHandle, GetFileInformationByHandleEx,... return symbolic link size - 0 bytes. If file is open without FILE_FLAG_OPEN_REPARSE_POINT value, functions return target file size > 0 bytes. Could you please check this, and if it works, add another field with target file size? |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
Posted: Sat Feb 04, 2012 1:01 am Post subject: |
|
|
I thought about it, but I was too lazy to add field with such ammount of units (tc.size provides 8 units - bytes, kbytes, Mbytes, Gbytes and floating ones). Maybe I'll add such field with only integral units.
Well, I found extra compact way to work with units (B, KB, MB, GB).
| Code: | | filesize.QuadPart>>=10*UnitIndex; |
NTLinks 1.5.2.190 32/64
+ new field to get real size of a file behind symlink _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
zeeko Junior Member

Joined: 21 Feb 2009 Posts: 20
|
Posted: Sat Feb 04, 2012 6:23 pm Post subject: |
|
|
Thanks!
It works, but only for x86.
wdx_NTLinks_1.5.2.190.zip contains an old version of NTLinks.wdx64, v1.5.2.160.  |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
|
| Back to top |
|
 |
zeeko Junior Member

Joined: 21 Feb 2009 Posts: 20
|
Posted: Mon Feb 06, 2012 4:44 pm Post subject: |
|
|
Is it possible to set HLNK_Count to zero if symlink/junction is not valid (RP_IsValid=No) ?
Or HLNK_Count=0 holds different information? |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4598 Location: Russian Federation
|
|
| Back to top |
|
 |
sgp Senior Member

Joined: 31 Jan 2005 Posts: 306
|
Posted: Sat Apr 28, 2012 2:01 am Post subject: |
|
|
Wow, symlink file target resolution works on XP too even though XP doesn't support file symlinks. That's very cool! Thank you for this update.
Edit: However, RP_IsValid returns Yes on XP for file symlinks. Shouldn't it return No instead (and still resolve the symlink, since your plugin can?) |
|
| 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
|
|