Windows 10: How to create a symbolic link in command line and safe start in directory

Discus and support How to create a symbolic link in command line and safe start in directory in Windows 10 Customization to solve the problem; Hello,Simple question complicated task. When dragging and dropping in Windows and clicking "Create Shortcut here", it creates shortcut and saves "Start... Discussion in 'Windows 10 Customization' started by Ivan Mamkaitis, Jul 29, 2021.

  1. How to create a symbolic link in command line and safe start in directory


    Hello,Simple question complicated task. When dragging and dropping in Windows and clicking "Create Shortcut here", it creates shortcut and saves "Start in" original directory for that bat file.mklink command line does not have that option.Is that possible?thanks in advance.

    :)
     
    Ivan Mamkaitis, Jul 29, 2021
    #1
  2. Naki Win User

    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile How to create a symbolic link in command line and safe start in directory :)
     
  3. How to create a Symbolic Link on Windows 10?

    How do I create junctions or directory symbolic links in Windows 10?

    Note: For reference, the link in the question refers to the following commands.

    Create a junction:

    Create a directory symbolic link:

    You can use either mklink /j or junction in Windows 10 to create junctions.

    You can use mklink /d in Windows 10 to create directory symbolic links.

    Notes:

    • junction can also list junctions and determine if a file is a junction unlike mklink.
    • mklink is an internal command only available within a cmd shell.
    • By default Administrator privileges are required to create symbolic links.

      It can also be granted to other users. The security setting "Create symbolic links" can be granted at:


    Examples

    Using mklink to create a directory symbolic link:

    Using mklink to create a junction:

    Using junction to create a junction:

    It seems like the junction command has been retired in Windows 10.

    You can download junction from Windows SysInternals (which is part of Microsoft):

    Further Reading

     
    DavidPostill, Jul 29, 2021
    #3
  4. Bree Win User

    How to create a symbolic link in command line and safe start in directory

    Exclude folder form Symbolic link ?

    Xcopy and Robocopy are not third party apps - they are Windows 10 command line utilities, presumably being used here to make backup copies of user files. I wrote my own .bat file using Robocopy that does full or incremental backups of my user folder to an external or network drive of my choice. I very soon learned the perils of Robocopy and symbolic links...
    The dangers of robocopy and symbolic links

    The switch I had to use for Robocopy is:
    /XJD :: eXclude Junction points for Directories.

    This one may be of use to @JerometheGiraff:
    /SL :: copy symbolic links versus the target.

    You could try combining that with...
    /XD dirs [dirs]... :: eXclude Directories matching given names/paths.
    ...but I'm not sure if that applies to symbolic links.

    Get to Know Robocopy for More Powerful File Management
    Robocopy and a Few Examples
    Type Robocopy /? in a command prompt for the full list of options or see:
    https://technet.microsoft.com/en-gb/...mands/robocopy

    Xcopy is far older than Robocopy and dates back to DOS 3.2. It supports the options:

    /EXCLUDE:file1[+file2][+file3]...
    Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the
    strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
    ....
    /B Copies the Symbolic Link itself versus the target of the link.

    Type Xcopy /? for the full list.
     
Thema:

How to create a symbolic link in command line and safe start in directory

Loading...
  1. How to create a symbolic link in command line and safe start in directory - Similar Threads - create symbolic link

  2. OneDrive that uses symbolic linked directory

    in Windows 10 Gaming
    OneDrive that uses symbolic linked directory: I have about 950GB of data stored in OneDrive on my Windows 10 machine. But my disk is only 500 GB. I am able to do this by defining a linked folder from C:\OneDrive that points to a second drive mklink /J C:\OneDrive\NoBackup W:\OneDrive.All works fine until I need to select...
  3. OneDrive that uses symbolic linked directory

    in Windows 10 Software and Apps
    OneDrive that uses symbolic linked directory: I have about 950GB of data stored in OneDrive on my Windows 10 machine. But my disk is only 500 GB. I am able to do this by defining a linked folder from C:\OneDrive that points to a second drive mklink /J C:\OneDrive\NoBackup W:\OneDrive.All works fine until I need to select...
  4. OneDrive that uses symbolic linked directory

    in Windows 10 Network and Sharing
    OneDrive that uses symbolic linked directory: I have about 950GB of data stored in OneDrive on my Windows 10 machine. But my disk is only 500 GB. I am able to do this by defining a linked folder from C:\OneDrive that points to a second drive mklink /J C:\OneDrive\NoBackup W:\OneDrive.All works fine until I need to select...
  5. How to create hard links to folders in Command Prompt?

    in Windows 10 Network and Sharing
    How to create hard links to folders in Command Prompt?: Hi, I'm trying to create hard links to folders in Command Prompt, just like junction /j but instead of creating a shorcut, I want to create an actual copy of the folder - hard link make the 'minecraftWorlds' appears like a regular folder. [ATTACH] I used this to create a...
  6. command line directory contents

    in Windows 10 Network and Sharing
    command line directory contents: when I use 'dir' to see the contents of a directory, I have two subdirectories, one shows up as " <dir> . " and the next as " <dir> .. " What are these seemingly empty directories?...
  7. How to start a command in a sub-directory ?

    in Windows 10 Support
    How to start a command in a sub-directory ?: Hi, when i have a sub-directory "bin", which has a cake.exe, and i type "bin/cake" or "./bin/cake" or "/bin"cake" it cant't finde the cake.exe. I'm getting an error message for example: "'bin' is not recognized as an internal or external command" How is the right syntax ?...
  8. Word does not want to save to a symbolic link directory

    in Windows 10 Network and Sharing
    Word does not want to save to a symbolic link directory: Hi there, I have opened a file from a symbolic link folder (File is located on another computer in a folder that has been linked as a symbolic link on my computer) When I try to do Save As under a different name on the same folder I get "A file error has occurred" error. If...
  9. Create Soft and Hard Symbolic Links in Windows

    in Windows 10 Tutorials
    Create Soft and Hard Symbolic Links in Windows: How to: Create Soft and Hard Symbolic Links in Windows How to Create Soft and Hard Symbolic Links in Windows A symbolic link is a file-system object (file or directory) that points to another file system object (file or directory). The object being pointed to is called...
  10. How to start Microsoft Photos from command line?

    in Windows 10 Software and Apps
    How to start Microsoft Photos from command line?: Hi! In Windows 10 is new app for photos and albums as default picture viewer. In Windows 8.1 I used JPEGView, and sometimes Windows Photo Viewer. Now I'm customizing Windows and I know how to start Photo Viewer from cmd and created context menu item. I want to associate...

Users found this page by searching for:

  1. jonction command with mklink