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. Command line commands

    in Windows 10 Customization
    Command line commands: I would like to create a shortcut on the desktop using a command in a .bat file. I would like to specify what icon file to use, what program to execute, and the parameters to pass to the program. I have researched MKLINK but I don't think it will do the job. Any...
  3. 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...
  4. 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?...
  5. How to force close modern apps via command line or link

    in Windows 10 Software and Apps
    How to force close modern apps via command line or link: Hi Recently I found that the trick I was using for see the pictures in the old picture viewer is no loger working, so I have to use Photos app instead. However, that app is very unstable and crashes every time I open a couple instances. Also, It keeps in the main taskbar...
  6. 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 ?...
  7. 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...
  8. 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...
  9. 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...
  10. Symbolic Links (Soft Links)

    in Windows 10 Support
    Symbolic Links (Soft Links): Greetings, I have a large number of symbolic links (soft links) on my PC that I want to migrate to a new machine with an identical directory structure. When I use various backup or copy programs that clone files (bit copy), the symbolic links do not work on the target...