Windows 10: Create a shortcut to a file within a folder whose name changes...

Discus and support Create a shortcut to a file within a folder whose name changes... in Windows 10 Ask Insider to solve the problem; I have an antivirus program (Norton product) that updates automatically. The executable file for the program resides in a folder whose name is the... Discussion in 'Windows 10 Ask Insider' started by /u/Jz_Inc, Jun 25, 2020.

  1. /u/Jz_Inc Win User

    Create a shortcut to a file within a folder whose name changes...


    I have an antivirus program (Norton product) that updates automatically. The executable file for the program resides in a folder whose name is the version number of the application. As the program get's updated, so does the folder name but the executable file keeps the same name.

    For example, the executable file name is "uiStub.exe" and it's located in:

    C:\Program Files\Norton Security\Engine\22.20.2.57\

    After the automatic update the directory updated to:

    C:\Program Files\Norton Security\Engine\22.20.4.57\



    Obviously, this breaks the shortcut because the path is no longer valid after the update. Every time the program is updated, the shortcut stop working and I have to create a new one again. This is incredibly annoying.



    Is there a way to create a shortcut whose path updates automatically?

    submitted by /u/Jz_Inc
    [link] [comments]

    :)
     
    /u/Jz_Inc, Jun 25, 2020
    #1
  2. Flava0ne Win User

    Creating Shortcuts with Batch File

    I've created a Batch file which calls on the following VB Script to be able to create a shortcut to my desktop:

    VB Script (named createLink.vbs):
    Code: set objWSHShell = CreateObject("WScript.Shell") set objFso = CreateObject("Scripting.FileSystemObject") ' command line arguments ' TODO: error checking sShortcut = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(0)) sTargetPath = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(1)) sWorkingDirectory = objFso.GetAbsolutePathName(sShortcut) set objSC = objWSHShell.CreateShortcut(sShortcut) objSC.TargetPath = sTargetPath objSC.WorkingDirectory = sWorkingDirectory objSC.Save[/quote] Batch File Example (for Windows Notepad):
    Code: @Echo off cscript createLink.vbs "C:\Users\Administrator\Desktop\Notepad.lnk" "C:\Windows\System32\notepad.exe"[/quote] But after creating the shortcut using this method, I'm not able to assign a custom icon for the shortcut. I get the following error message when trying to do so:


    Create a shortcut to a file within a folder whose name changes... Error503.jpg


    Any help and ideas on what I need to put into the VB Script and/or Batch File to be able to do this would be greatly appreciated! *Big Grin Create a shortcut to a file within a folder whose name changes... :D

    Also, I know that I can simply do this by going to Start Menu\All Programs\Accessories\ right-clicking on Notepad and selecting Send to\Desktop (create shortcut). Easy enough for creating a single shortcut. But I need to create several multiple shortcuts and using this Batch/VBS method would really save me a lot of time in doing so.
     
    Flava0ne, Jun 25, 2020
    #2
  3. Flava0ne Win User
    Creating Shortcuts with Batch File

    Tried both of the VB Scripts that you provided and adding the 9 switch to the batch file but neither was able to create a shortcut to my desktop.
     
    Flava0ne, Jun 25, 2020
    #3
  4. RonZajac Win User

    Create a shortcut to a file within a folder whose name changes...

    "Create Shortcut" to a folder on a USB drive not working

    Figured it out, and I have to admit it's (more than) a little embarrassing.

    It turns out the generated shortcuts were being deposited elsewhere in the explorer folder window, out of sight.

    The folder contents are sorted by Name, alphabetically, but with node type as a primary key, with folders at the top, using the List view. I have hundreds of folders in this folders, so I'm instigating this creation of a shortcut *of* a folder among a sea
    of folders in my list.

    What was happening is that the Shortcut *was* being created, but deposited for viewing among the files, out of my sight. I accidentally tripped over scads of created shortcuts when I was scrolling along!

    Since I normally create shortcuts of files (not folders), the new shortcut is usually deposited right alongside the target file. I expected this behavior when creating a shortcut for a folder, but it was a mistaken expectation.

    Problem "solved"; a dumb User error fixed by a slightly smarter User.

    Sorry for the red herring.
     
    RonZajac, Jun 25, 2020
    #4
Thema:

Create a shortcut to a file within a folder whose name changes...

Loading...
  1. Create a shortcut to a file within a folder whose name changes... - Similar Threads - Create shortcut file

  2. Files created on chrome_PuffinComponentUnpacker_BeginUnzipping* folder, within temp folder?

    in Windows 10 Gaming
    Files created on chrome_PuffinComponentUnpacker_BeginUnzipping* folder, within temp folder?: I have witnessed following files being created on my PC during the startup: C:\\Users\\User1\\AppData\\Local\\Temp\\chrome_PuffinComponentUnpacker_BeginUnzipping11296_2132512403\\app-setup.js...
  3. Files created on chrome_PuffinComponentUnpacker_BeginUnzipping* folder, within temp folder?

    in Windows 10 Software and Apps
    Files created on chrome_PuffinComponentUnpacker_BeginUnzipping* folder, within temp folder?: I have witnessed following files being created on my PC during the startup: C:\\Users\\User1\\AppData\\Local\\Temp\\chrome_PuffinComponentUnpacker_BeginUnzipping11296_2132512403\\app-setup.js...
  4. Shortcut for a file within a folder

    in Windows 10 Network and Sharing
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  5. Shortcut for a file within a folder

    in Windows 10 Gaming
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  6. Shortcut for a file within a folder

    in Windows 10 Software and Apps
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  7. Shortcut for changing multiple file names

    in Windows 10 Ask Insider
    Shortcut for changing multiple file names: Is there anyway to highlight multiple files and edit their names without having to individually right click and rename each file? Edit: or even just a quicker way to rename a single file like a key combination submitted by /u/DankDoobies420 [link] [comments]...
  8. Need to change file location within a folder

    in Windows 10 Customization
    Need to change file location within a folder: Need to change location of a file within a folder. https://answers.microsoft.com/en-us/windows/forum/all/need-to-change-file-location-within-a-folder/2d53b1c5-0c56-48e8-946b-993f55548fbb
  9. Changing file name changes the folder name AND cannot find the folder

    in Windows 10 Support
    Changing file name changes the folder name AND cannot find the folder: Two odd things are happen to my files: 1. Changing only the file name in explorer changes the folder name 2. I cannot locate the directory (possibly a library) Here's what is happening in explorer: I search for the text OLD, the results come up: file=IMG_3654.JPG folder...
  10. Create Offline Files Folder Shortcut in Windows

    in Windows 10 Tutorials
    Create Offline Files Folder Shortcut in Windows: How to: Create Offline Files Folder Shortcut in Windows How to Create Offline Files Folder Shortcut in Windows Offline Files is a feature of Sync Center that makes network files available to a user, even if the network connection to the server is unavailable. Users...