Create Symlink in Windows from command line without ".lnk"



Symbolic links, also known as symlinks, are a type of link in a file system, allowing a user to create a link to a file or directory located in another directory or even on another drive. Symlinks can be created in Windows from the command line using the mklink command.

The mklink command is a Windows built-in command line utility used to create symbolic links in Windows. It is available in Windows Vista and later versions, including Windows 7, 8, and 10. The mklink command can create a symbolic link from the command line without the need for a third-party utility.

Symbolic links are a form of virtual directory that allows a user to access a file or directory located in another directory or even on another drive. A symbolic link does not actually occupy any disk space, but instead acts as a pointer to the original file or directory. This means that if the original file or directory is moved or deleted, the symbolic link still points to the original location and the file or directory can still be accessed.

To create a symbolic link from the Windows command line, open a command prompt window and type the following command:

mkLINK [LINK] [TARGET]

Where LINK is the name and path of the symbolic link, and TARGET is the name and path of the file or directory the symbolic link will point to.

For example, to create a symbolic link named c:\\linktest that points to c:\\test, the command would be:

MKLINK c:\\linktest c:\\test

The command will create a symbolic link to the target file or directory. You can then access the target file or directory by using the link you created.

In addition to creating symbolic links, the mklink command can also be used to delete, modify, and list existing links. To delete a symbolic link, use the command:

MKLINK /D [LINK]

To modify a symbolic link, use the command:

MKLINK /H [LINK] [TARGET]

To list existing links in the current directory, use the command:

MKLINK /L

Using the mklink command, you can easily create, delete, modify, and list symbolic links from the Windows command line. This can be useful for IT administrators who want to quickly create and manage symlinks without the need for a third-party utility.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo