

However, if you create a directory symbolic link or junction point and open that link or pointer and delete files in the directory, those files are deleted. When you delete a symbolic link or a junction point, it's only removing the link or pointer and not the file or directory to which it's pointing. Will deleting a symbolic link or junction point delete the linked files or directory? How do I delete a junction point?Ī junction point is only going to be a directory, so you should only need to use the rmdir command to remove it.

Now, right-click on the new shortcut and select Properties. For name, provide the program (or file) name for which you are creating the shortcut, then hit Finish. In the field that asks you to enter the item’s location, enter: explorer.exe. If you created a symbolic link () of a file, to delete a symbolic link use the del command. Here are the steps: Create a new shortcut using Create Shortcut Wizard (right-click > Shortcut). If you created a symbolic link using the command shown above, move to the root directory since it is "\Docs" and use the rmdir command. To delete a symbolic link, treat it like any other directory or file. mklink /d files "c:\program files" How do I delete a symbolic link? In the example below, we are creating a symbolic link to the "c:\program files" directory from the current directory. If the file or directory you want to link or point to contains a space in its name, it must be surrounded with quotes. How do I create a symbolic link or junction to a directory with a space? Below is an example of what the above junction directory would look like in the command line. Once the junction is created, using the dir command you can see any junction in the directory listing of where the junction was created. If created successfully, you will see a message similar to the example shown below. As seen, we are using the /j switch instead of the /d switch. To create a junction point to a local directory, perform the following command. Similar to URL files, the LNK file extension is not shown in the filename, even when the option to hide file extensions is disabled.A junction point can only link to a local directory. Those attributes can be set by right-clicking the shortcut file and selecting "Properties". LNK files with shortcuts to an EXE program file can specify how the program should be run. Thus, when clicking on the icon, the program operates just as if the original icon would have been clicked. LNK files are typically implemented as a small file that comprises of a target GUID or URI to an object or the name of a target program represented by the shortcut. The icon used for the LNK file is usually the same icon used for the target program with a curled arrow indicating that it's a shortcut. By selecting “Create Shortcut” option the LNK file is created.

A shortcut file can easily be created by clicking the right mouse button on a file the shortcut should be created from. LNK files are also known as Shortcut Files that are being used as a reference by Windows to an original file containing the shortcut target type, filename, location, the program that can open the file, and a shortcut key which is optional.
