25
6
Is it possible to change the target of a symlink or junction in Windows? In Linux it can be modified with:
ln -f
25
6
Is it possible to change the target of a symlink or junction in Windows? In Linux it can be modified with:
ln -f
13
With Windows Link Shell Extension installed, you can right-click on the link in Windows Explorer and check the properties. There is a tab that allows you to change the link directly.
Sorry I can't say if this is possible without the extension installed as it is one of the first things I install after Windows.
The Windows command link tool mklink
does not allow this.
There are, however, Windows equivalents for Linux commands. ln.exe is one:
3
Just remove and recreate the link. That's all that -f does in Linux anyway.
Also, here's a cool Windows Link Shell Extension.
0
The method belo works for me in Windows 7
mklink TempLink NewTarget
copy /l /y TempLink OldLink
del TempLink
mklink
would be the Windows-integrated command for linking (symbolic and hard). – Jinxed – 2016-02-28T22:08:46.957@Jinxed, I already said that mklink doesn't do what the OP asked. – Julian Knight – 2016-02-29T22:36:01.650
1The windows Methodology for changing the location of a softlink using MKLINK is to delete the link (Using
RD /Q
if a directory link, orDel /F /Q
if a file link) and recreate it uisang MKLINK. egRD /Q "C:\Link\Folder" && MKLINK /D "C:\Link\Folder" "C:\Some\New\Target\Folder"
andDel /F /Q "C:\Link\File Link" && MKLINK "C:\Link\File Link.ext" "C:\Some\New\Target\File here.ext"
This is also True for Junctions and Hard Links. – Ben Personick – 2019-05-14T15:33:42.460This solution seems to work however I didn't test it thoroughly. – Eugeniu Torica – 2012-07-23T09:32:08.280
wow! Link Shell Extension, also notably, includes a Symbolic Link Driver for Windows XP among it's downloads. – n611x007 – 2013-03-27T11:50:02.930