Using Command Prompt (CMD) or PowerShell:
Open Command Prompt or PowerShell as Administrator:
- For Command Prompt, right-click on the Start button, select "Command Prompt (Admin)."
- For PowerShell, right-click on the Start button, select "Windows PowerShell (Admin)."
Navigate to the directory where you want to create the symlink:
bashcd path\to\directory
Create the symlink:
- For a file:bash
mklink linkname filepath
- For a directory:bash
mklink /D linkname targetdirectory
Replace
linkname
with the desired name for the symlink and replacefilepath
ortargetdirectory
with the path to the file or directory you want to link.Example for a file:
bashmklink mylink.txt C:\path\to\myfile.txt
Example for a directory:
bashmklink /D mylinkfolder C:\path\to\myfolder
- For a file:
Press Enter.
No comments:
Post a Comment