Skip to content

Mklinker is a cross-platform console utility that let's you create multiple symbolic / junction / hard links at once based on a portable config file

License

Notifications You must be signed in to change notification settings

rubenchristoffer/Mklinker

Repository files navigation

Mklinker

Build AppVeyor Build AppVeyor Tests Coverage Report Release NuGet License

Mklinker is a cross-platform console utility that let's you create multiple symbolic / junction / hard links at once based on a single config file.

Table of contents

  1. Why use Mklinker? Who cares about symbolic links?
  2. Installation
    1. Using NuGet (preferred)
    2. Using pre-compiled binaries
    3. From source code
  3. How do I use Mklinker?
  4. Features
  5. Contributing

Why use Mklinker? Who cares about symbolic links?

  • With Mklinker you can keep the config file around and if you for example re-install your operating system you can just use Mklinker and restore all the various links you had before. This is especially useful if you are using a syncing program like Dropbox as it allows you to easily add links to outside folders like AppData, Program Files or My Documents
  • With Mklinker you can easily setup outside references in your projects (you're welcome to use it in your own github repos!)
  • With Mklinker you can send someone the config file and they can easily create all the links
  • Mklinker is cross-platform (windows, linux, mac)

Installation

Using NuGet (preferred)

Installing using NuGet is the easiest and preferred way as it allows you to call mklinker commands globally from command-line. Note that you need .NET Core 3.1 SDK installed

Instructions

  1. Go to NuGet package here
  2. Run command listed under .NET CLI to install the latest version of Mklinker as a global tool.

You can then run mklinker from the command-line globally. If you want to install a previous version you can run dotnet tool install --global Mklinker --version x.y.z instead (x.y.z is version number). It is also possible to install as a local tool if you exclude --global from the command.

Using pre-compiled binaries

Using pre-compiled binaries is a viable alternative if you do not have the .NET SDK installed and just want to run mklinker locally rather than globally. Note that it is possible to make it available globally, but in order to do so you would have to add the folder where you copy mklinker to the PATH environmental variable or copy mklinker to an existing folder that is specified in the PATH environmental variable.

Instructions

  1. Download the ZIP file from from releases containing Mklinker binaries
  2. Unzip the ZIP file (I personally recommend using 7-Zip for this)
  3. Copy the file for your operating system and architecture and put it into a folder of your choosing. Note that you can safely ignore the .pdb file, you only need to copy the actual binary file

You should now be able to run mklinker commands from the command-line from the same folder that the Mklinker binary file resides in. TIP: You can safely rename the binary file to whatever you want to make it easier to run from command-line.

From source code

If you are a purist or simply paranoid it is possible to compile the binaries yourself from the source code!

Instructions

  1. Clone the repository using git clone https://github.com/rubenchristoffer/Mklinker.git (you need git installed)
  2. Navigate to root folder for Mklinker
  3. Run publish.bat or publish.sh (you need .NET Core 3.1 SDK installed)

The binaries will then be compiled and put into the Mklinker/bin/ folder in the format Mklinker-x.y.z-OS. You can then copy the binaries to wherever you want to install and run Mklinker. See the instructions above Using pre-compiled binaries for more info about what to do with the binaries you just compiled.

How do I use Mklinker?

Run mklinker help to see all verbs / commands and their description. You can also run mklinker help [VERB] or mklinker [VERB] --help in order to get more information about that given verb / command. For example, mklinker help addlink will show you arguments that the addlink verb / command takes.

For more info, check out the Getting started page on the wiki.

Features

  • Supports symbolic, junction and hard links on Windows platform
  • Supports symbolic and hard links on Linux and Mac platforms (junction links will be treated as symbolic links)
  • Supports relative paths in config file, but will turn them into absolute paths when running linking commands.
  • Supports variables for paths (e.g. "C:\Users?User?\Desktop") which means that you can create more dynamic configs. Nested variables (variables inside variables) are also supported.
  • Supports custom config file name (if you don't like 'linker.config')
  • Supports config validation where you can check for errors and warnings
  • Supports interactive mode where you can run multiple commands without mklinker in front
  • Supports a scan command which will help with finding circular paths that can arise due to symbolic directories / junctions pointing to a parent folder. This is important when combining Mklinker with Syncing tools like Dropbox as loops may cause the syncing to go on "forever"
  • Supports adding multiple links at once using optional regex filters that also works for sub-directories (allows for recursion)

Contributing

Anyone is allowed to contribute and it is very appreciated! If you want to contribute, take a look at the CONTRIBUTING guidelines to get started.

About

Mklinker is a cross-platform console utility that let's you create multiple symbolic / junction / hard links at once based on a portable config file

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages