NTLinksMaker tool for Total Commander
-------------------------------------
(information in English is below)

   NTFS-  :
+   ,  ,    
+       
+     (    )
+    ,   
+      
+     


1.  

NTLinksMaker -          /   .     Windows  ,     .

   -  ,        ,    .   ,      .   (   Windows XP)                ,      .   Windows 2000.

   -   ,     .             .  ,           .            ,       .     ,         .   Windows 2000.

   - ,    ,      .      ,          .   Windows Vista,     .

   - ,         .     (  )     (      ).   Windows Vista,     .


2.  

      ,     ,    .    ,      *.*     (, *_z.*     "_z",   *  ).

        (.  /r),     ,          *,         \*\.

           (.  /l)        .

   ,     ,    ,  ,     ,     .


2.1.   

 :
	1. Ƹ  -    
	2.   ( ) -   ,      (  )
	3.    -     
	4.    -     
	5.    ( ) -    ,  ,  - 

 :
	1.   -    
	(  -   )


3.  

        .        ,         .             .

           .

        ,    .


4.  

     ,     ,  ,         . :

NTLinksMaker[.exe] [<parameters>] {<src_file>|@<src_list_utf16>} <dst_path>

:
	/l=0
		 ,        ,      .      -.
	/s[f|d][?|r|r?], /s[f|d]<num>
		 f ()  d ()   ,     ,  .      : "-" -  ,  -  , "?" -   , "r" -  , "r?" -    ,  -      ( .  .. 2.1).   /s  ,     ,    -  .
	/r=<path>
		           .             .
	/b
		       (     ).
	/n
		  ,       (     ,    ).
	/q
		  ,              .   ,   ,     (,   ).

          (    -   UTF-16   @)     .


 :

   D:\TEMP   C:\TEST (   ):
NTLinksMaker.exe "D:\TEMP" "C:\TEST\"

   D:\TEMP   C:\TEST   TEMPORARY (  ):
NTLinksMaker.exe /q /n "D:\TEMP" "C:\TEST\TEMPORARY"

      - D:\list.txt   C:\TEST (  ,   ):
NTLinksMaker.exe /q /s "@D:\list.txt" "C:\TEST\"

              - D:\list.txt   C:\TEST:
NTLinksMaker.exe /sf1 /sd5 "@D:\list.txt" "C:\TEST\"
NTLinksMaker.exe /sf- /sdr? "@D:\list.txt" "C:\TEST\"


5.  

            ,   INI.

  [NTLinks Maker]:

	FontName
		   ;
	FontSize
		   .      .     FontName;
	Language
		     (   );
	ConfirmSymlinkElevation=1
		        ;
	CopyAttributesToLinks=0
		      ( , , );
	FollowLinkDirLevels=0
		        (     ).

6.   

              ,          (           ).      : /q- /b /r="%P" "@%WL" "%T".  ,          /l  /s.        ,      "..",    /q   : "NTLinksMaker.exe" /q.


    : http://forum.wincmd.ru/viewtopic.php?t=13191



NTLinksMaker tool for Total Commander
-------------------------------------
(English section)

Tool for NTFS links creation:
+ supports junctions, hardlinks and symbolic links
+ allows duplicating first levels with regular folders
+ allows keeping directory structure (for objects from multiple dirs)
+ elevation request when admin rights needed
+ supports silent mode w/o any windows
+ Unicode and long paths support


1. General features

NTLinksMaker is a tool for creating file system links for single file/folder or a list of objects. All link types available in Windows are supported, the tool asks for elevation when administrator rights are required.

Junctions - pseudo-folders that show contents of some target folders and allow modifying it. They are similar to mount points that link to volumes. Old programs (including Explorer in Windows XP) treat them as regular folders and erase all target folder contents when you delete link, so it is better to delete them from TC. Supported since Windows 2000.

File hardlinks - equivalent links to the same file contents. Such links may have different names and located in different folders within same volume. You can change file attributes or contents via any of them, and other ones may show old attributes until you open file via them. File contents is kept on disk while at least one hardlink exists. Supported since Windows 2000.

Symbolic folder links - ones similar to junctions but support relative and UNC paths. Old programs may erase all target folder contents when you delete link. Supported since Windows Vista, administrator rights required for creation.

Symbilic file links - pseudo-files providing access to target file contents. Such links don't show file size (it is always zero) and attributes (modification date is always the same as link creation date). Supported since Windows Vista, administrator rights required for creation.


2. Dialog

You can change destination path and link name. In case of multiple objects link name must be *.* or a more complex mask (e.g. *_z.* adds "_z" to names while lonely * strips extensions).

If you want to keep partial paths of items relative to some folder, you should enable corresponding option and either start link name mask with * or insert special element \*\ before link name.

Also you can set number of levels to be duplicated as regular folders (/l option) and specify desired link types to be created for files and folders.

Some unneeded dialog controls may be disabled depending on list of targets, e.g. folder link type selector when no folders in list.


2.1. Link creation modes

For files:
	1. Hardlinks - only hardlinks
	2. Symbolic links (if necessary) - create symbolic links if hardlink creation fails (e.g. between volumes)
	3. Symbolic links only - only absolute symbolic links
	4. Relative symbolic links - only relative symbolic links
	5. Relative symbolic links (if possible) - relative symbolic links if possible, absoulte ones otherwise

For directories:
	1. Junctions - only junctions
	(other choices - as for files)


3. Error handling

The tool reports all errors and asks for an action. You can abort creation of links and exit, or you can skip current object or all further objects with errors. You also can fix problem and try to repeat link creation for current object.

If you ask to repeat, all further operations will be done with admin rights.

In silent mode no error messages or elevation requests will be shown.


4. Command line

Command line accepts source objects and destination path, and also optional parameters. Syntax:

NTLinksMaker[.exe] [<parameters>] {<src_file>|@<src_list_utf16>} <dst_path>

Parameters:
	/l=0
		Number of levels where folders will be duplicated as regular folders with file links inside them. Next level will be duplicated with folder links.
	/s[f|d][?|r|r?], /s[f|d]<num>
		Letters f (files) and d (directories) specify object types for creating links. Type may be specified with string or number: "-" - no symbolic, empty - symbolic only, "?" - symbolic if required, "r" - symbolic relative, "r?" - symbolic relative if possible, number - just like in dialog (refer to section 2.1 for details). If switch is not passed, junctions are created for folders and hardlinks for files.
	/r=<path>
		This option allows links creation with keeping directory structure. It sets base path which is used to detect and re-create partial paths for all objects.
	/b
		Block TC window when dialog is shown (as for regular copy/move TC dialogs).
	/n[-]
		This option must be set when destination path contains also link name.
	/q
		Enable silent mode which suppresses all questions and confirmations. Only possible actions will be performed and status code returned (nonzero in case of errors).

After parameters you should specify path to a source object (or path to a UTF-16 text file with list of objects prefixed with @) and a destination path.


Examples:

Create link for D:\TEMP in C:\TEST (dialog will be shown):
NTLinksMaker.exe "D:\TEMP" "C:\TEST\"

Create link for D:\TEMP in C:\TEST with name TEMPORARY (silent mode):
NTLinksMaker.exe /q /n "D:\TEMP" "C:\TEST\TEMPORARY"

Create symbolic links for objects from list D:\list.txt in C:\TEST (silent mode, admin rights required):
NTLinksMaker.exe /q /s "@D:\list.txt" "C:\TEST\"

Create symbolic links for files and possible relative links for folders from list D:\list.txt in C:\TEST:
NTLinksMaker.exe /sf1 /sd5 "@D:\list.txt" "C:\TEST\"
NTLinksMaker.exe /sf- /sdr? "@D:\list.txt" "C:\TEST\"


5. Configuration file

Configuration file must be placed near application and have same name and extension INI.

Parameters in [NTLinks Maker] section:

	FontName
		Dialog font face name;
	FontSize
		Dialog font size. Also affects size of controls. May be used without FontName;
	Language
		Current language file name (just name w/o path and extension);
	ConfirmSymlinkElevation=1
		Show elevation requirement confirmation for creating symbolic links;
	CopyAttributesToLinks=0
		Copy file/folder attributes to symbolic links (read only, hidden, system);
	FollowLinkDirLevels=0
		Enumerate folder contents behind folder links while duplicating levels (by default folder links are duplicated as links).


6. Integration with TC

If you want to create links for selected files/folders in TC, you should create a buttonbar button or user command (this one will allow adding tool to main menu or assigning a hotkey for it). Recommended parameter field string is: /q- /b /r="%P" "@%WL" "%T". Also you can alter initial dialog options using /l and /s keys. If you don't like to see help window when ".." item is focused, you can add /q key to command field: "NTLinksMaker.exe" /q.


Discussion page on official board: http://www.ghisler.ch/board/viewtopic.php?t=23681



History:

2020-04-25	1.4.2.436:
	* fixed skipping rest items while duplicating folder when some item failed and ignored (broken in 1.4.2.432)

2020-02-28	1.4.2.434
	* error handling relative destination path
	* fixed linking files to another volume in /s? mode (broken in 1.4.2.430)

2019-07-31	1.4.2.430
	+ respecting base path for any number of files with special \*\ item before file mask
	* normalize input paths before displaying in dialog
	* error message sometimes shown in silent mode

2019-03-12	1.4.1.416
	+ CopyAttributesToLinks, FollowLinkDirLevels options
	* do not ask to repeat in elevated mode when process is already elevated

2018-11-14	1.4.0.408
	+ locking some controls when list contains no files or folders
	+ enabling relbase checkbox for single object if dst path has wild name and /n is passed
	* some dialog controls adjusted
	* fixed enabling relbase checkbox with input field (broken since 1.3.0.376)
	* fixed passing mask to child instance

2018-10-30	1.4.0.384
	+ added numbers for link type modes in dialog
	+ added mixed relative/absolute symlink creation mode
	+ unlocking TC window explicitly after closing dialog (workaround for Windows bug)

2018-08-30	1.3.0.372
	+ relative symlink creation
	+ ConfirmSymlinkElevation option
	* separate link type selection for files and folders
	* do not allow junctions for UNC paths

2018-01-26	1.2.0.352
	+ symlink creation is allowed under Windows XP with Masatoshi Kimura driver
	* fixed overwriting of empty files by symlinks

2017-01-10	1.2.0.340
	+ wildcard filename mask support (default mask is now *.* for consistency with TC)
	+ symlinks are now created manually in Explorer-compatible form

2016-11-07	1.1.1.322
	* source/target UNC path support (long path issue)

2016-01-17	1.1.0.306
	* /l=-1 worked as /l=0

2015-10-05	1.1.0.304
	+ paths with up to 1024 characters are supported now
	* a bit better error reporting
	* fixed junctions creation for long targets

2015-07-30	1.0.5.272
	+ FontName, FontSize options added
	- Windows font detection removed

2015-02-06	1.0.5.262
	+ creates intermediate folders
	+ /r parameter with base path to cut when determining destination name
	+ /s? parameter allows symlink creation when it is impossible to create old links
	+ detects Windows font to use in dialog
	* better error handling with hardlinks and new dir creation

2014-10-08	1.0.4.170
	+ retry/skip inner files/folders in case of nonzero level number

2014-08-14	1.0.3.154
	+ ignore all button added to error dialog
	+ left/right keys goes to selection start/end in input field
	* /l=-1 is now supported

2014-02-24	1.0.2.122
	+ supports junctions/hardlinks/symlinks and folder level to duplicate
	+ asks for elevation when required
	+ is able to block TC window
	+ F5/F6 switches selection in input field (like in TC)
	* do not enter reparse points
