Possible to sort shortcuts by target path?

Page 2 of 2 FirstFirst 12

  1. Posts : 43,004
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #11

    I found I simply had to drop the folder onto the vbs file, then enable the comments column in file explorer.
    I also had to restart f. explorer for the comments to show.
    Last edited by dalchina; 19 Dec 2023 at 00:52.
      My Computers


  2. Posts : 213
    Windows10
    Thread Starter
       #12

    I got this for every shortcut in the folder:
    https://i.postimg.cc/3rFMYj1Q/popup.jpg
      My Computer


  3. Posts : 43,004
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #13

    Yes, me too..

    Reposted your screenshot using the preferred forum features
    Possible to sort shortcuts by target path?-1.jpg

    - this is how:
    Possible to sort shortcuts by target path?-screenshot.png
    Tutorial available.
      My Computers


  4. Posts : 43,004
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #14

    This version of the script (the two 'echo' lines commented out with " ' " ) is 'silent:

    Code:
    '18/12/23 MNG try to set description/comment on shortcut
    'Drag folder and drop on script to pass folder name
    
    'wscript.echo "args(0):" & wscript.arguments(0)
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(wscript.arguments(0))
    set objFiles = objFolder.files
    for each filnam in objFiles
    	if filnam.type = "Shortcut" then
    		' wscript.echo filnam
    		Set lnk = WshShell.CreateShortcut(filnam)
    		lnk.description = lnk.targetpath
    		'lnk.description = "cleared"
    		lnk.save()
    	end if
    next
      My Computers


  5. Posts : 1,223
    W10-Pro 22H2
       #15

    dalchina said:
    This version of the script (the two 'echo' lines commented out with " ' " ) is 'silent:
    Thanks, Dalchina - I got here too late to suggest that! I only left it as a check for debugging - should have mentioned it. Glad to have helped. Martin
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:06.
Find Us




Windows 10 Forums