Search code examples
windowspowershellcmdsymlink

Windows : navigate into symlink


I created a symbolic link in windows and it's working fine :)

when I run:

Get-ChildItem myLink

I get:

d-----        MyFolder

But when I run:

cd myLink

It shows error of null exception

I want to run a solution in this path

myLink\MyFolder\mySolution.sln

How can I run it? Tnx.


Solution

  • I used

    New-Item -Path $newFolder  -ItemType SymbolicLink -Value $oldFolder -Force
    

    Using mklink works fine:

    mklink /d $newFolder $oldFolder