Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts
    Environment Windows XP-SP3 NTFS

    Does anyone know how to make a file comment appear as a comment in a shortcut to that file.

    I put a comment on files & folders indicating process status. If I a create a shortcut for a file or folder I'd like to see the same comment in the shortcut.

    If I change the comment on the target file or folder I'd like to see the new value when I look at a shortcut to the file or folder.

    Manually maintaining the same comments on the target and shortcut files would be impractical, however a delay would be acceptable.

    I'm wondering if there's a program that periodically scans shortcut files in designated directories, it would compare the shortcut and target comment fields, if they are different then the shortcut comment would be changed to the same value as the target comment.

    Any ideas welcome (what happened to WinFS, did we ever get it ?)

  2. #2
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,421
    Thanks
    33
    Thanked 195 Times in 175 Posts
    I wasn't aware that it was possible for a shortcut to include a comment! Here are the parameters from an old (1997!) Resource Kit program SHORTCUT.EXE - significantly devoid of any mention of a comments field...

    Code:
    shortcut: [-? -h -f -c -r -s] [[-t] target [[-n] name]] [-d working directory]
    	[-a Arguments] [-i Iconfile] [-x Icon index] [-u {all|[natdix]}] 
    	[-l logfile]
    
      -? -h        This help
      -f           Force overwrite of an existing short cut
      -c           Change existing shortcut
      -s           Make shortcut non tracking (Stupid)
      -r           Resolve broken shortcut
      -t target    Specifies the target of the shortcut
      -n name      Specifies the file name of the shortcut file
      -d directory Specifies the directory name to start the application in
      -a arguments Specifies the arguments passed when the shortcut is used
      -i iconfile  Specifiles the file the icon is in
      -x index     Specifies the index into the icon file
      -u [spec]    Dumps the contents of a shortcut. 'all' is the same as 'natdix'
                   but the letters of 'natdix' can be specified to display specific
                   fields in the shortcut (repeats allowed, and order followed)
      -l logfile   record error messages in specified file
    BATcher

    Time prevents everything happening all at once...

  3. #3
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts
    Thanks BATcher

    I am pretty certain that ALL NTFS objects have provision for a Comments property, but Windows Explorer hides the property for many NTFS object types - folders. .lnk files etc.

    If you show the Comments property as a column in Windows Explorer then for shortcuts it displays the Target File file in the Comments. But "advanced" file managers (eg xplorer2 and totalcommander) show Comments and Target Path as discrete properties.

    I read somewhere that properties such as Comments and Duration are stored as Alternate Data Steams - but I don't think that's correct, if I look at a file (irrespective of its type) that has a Comment property with a utility such as streamexplorer then I see no sign of an any ADS's other than the Object Id and Security Id. I think the Comment property (and other "extended" properties) are stored within the file/folder directory entry not within the data object.

    The shortcuts where I'd like to see the target Comment reflected are shortcuts to folders rather than files. Yes folders can have a Comment property, and they can have ADS's.

    If I use folder junctions then I can see the same comment on both the real folder and the junction point. If I change the Comment value in either place then it will change in both places, because its the same data. Junctions utilise a "special" NTFS object called a reparse point, whereas a shortcut file is a regular file with the extension.lnk. But junctions are not as convenient as shortcuts because their creation and deletion must be handled by third party software. And the comment property is not visible in the junction point when its initially created.

    MS neglected to implement many NTFS features in Windows Explorer - reparse points, hardlinks, junctions, ADS's etc. I suspect the reason was that WinFS would have made these things redundant - but AFAIK WinFS has never managed to liberate itself from bowels of the Redmond zoo

    thanks

  4. #4
    2 Star Lounger
    Join Date
    Jun 2010
    Location
    sydney
    Posts
    164
    Thanks
    22
    Thanked 16 Times in 14 Posts
    I solved my problem - use junctions rather than shortcuts,

    my file manager (xplorer2) shows the infotip property stored in the desktop.ini file as a comment on folders (providing the folder is read only - but that's the nature of desktop.ini files in folders).

    If I make the junction read only then you see the same comment, and if I change the "comment" from the folder or a junction it changes everywhere - because I'm actually changing the infotip property in the desktop.ini file.

    The other advantage of junctions is that backspace takes you back to the parent folder of the junction,

    And yes I understand all the "issues" regarding the deletion & renaming of junctions.

    pd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •