1.    04 Jun 2016 #1
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,369
    Windows 10 Pro X64 16299.19

    Target for a folder full of links will be moved

    I have a folder that contains links to programs that reside in various other folders, called SysTools. I like to have the links for tools I use for various things in one place.

    I'm copying the SysTools folder to my Laptop and need to change all the Target drives from D:\..... to C:\.....
    Anyone know of a program that can do this in bulk or the Powershell command that could do this?

    If there were only a few I'd do it manually but there are over 70 so some automation would be nice.
      My ComputersSystem Spec
  2.    04 Jun 2016 #2
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,369
    Windows 10 Pro X64 16299.19
    Thread Starter

    I found some of what I need.

    $shell = New-Object -COM WScript.Shell
    $targetPath = $shell.CreateShortcut($FullLinkPath).TargetPath
    This gets me the existing Target path when I give it the fully qualified path to the link.

    I think this will replace D:\ with C:\

    $newtargetpath = "$targetpath" -replace 'D:\' C:\'
    Now how do I update the Target path in the original link?

    Would something like

    $shell.TargetPath = $newtargetpath
    do the trick?
      My ComputersSystem Spec


Similar Threads
Thread Forum
Solved I've moved shared Pictures folder to another drive but didn't name it
Hello, I recently upgraded to Windows 10, Put OS onto SSD along with a few other essentials and have a second hard drive for storage. The shared Pictures, Videos, Documents (etc) folders were all by default on my relatively small SSD. Figured...
General Support
"Create Shortcut"s target path points to wrong Program Files folder.
When I create a shortcut to file in Program Files, the target path for that shortcut will be to Program Files (x86), even though the start in path will be correct. Furthermore, even though the target path is incorrect and no icon is displayed for...
General Support
Solved Lost specific apps (links) in ALL APPS folder
Was fixed
Software and Apps
Solved Internet Explorer has been moved to the Accessories folder in 10049.
I have previously read on windows10update that Microsoft was planning to move IE to the accessories folder, and remove its shortcuts on the taskbar and start menu. I thought this would only happen in a future build... But it's already the case...
Browsers and Email
Windows 10 RTM: June is the target
Source See also: Windows 10 release date rumors challenge traditional development schedule
Windows 10 News
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 22:01.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App

Windows 10 Forums