2006-11-24

Windows Hardlink

Basically a hardlink can be seen as
- one physical file/folder
- but multiple names (cf. My Documents appears in multiple places)

hardlink files:
use system command: "fsutil hardlink create"

hardlink folders:
better known as Junction directories
some third party software may be required to take full advantage of this feature
See: http://www.microsoft.com/technet/sysinternals/Utilities/Junction.mspx

2013 update

In more recent Windows versions it is easier to invoke:

$> mklink /H "%junction_path%" "%original_location%"

in order to create a hardlink

Or this:

$> mklink /D /J "%junction_path%" "%original_location%"

in order to create a directory junction


2006-11-22

Batch parameters

To see all the parameters in action, put them into the batch file testing.bat, as follows (NOTE: the tilde character strips the eventual quotes that might be around of the parameter):

Then, run the file with a long filename. For example, the batch file run on the file c:\temp\longfilename.long would produce the following output:
For more information about how to process strings in a batch file, visit: http://www.dostips.com/DtTipsStringManipulation.php (great reference).