It is now in the > Mega ScriptsPack <
The new version depends on other scripts also contained in this package.
VirtualCopy v0.01.0001
(create junctions and hardlinks)
With this Script you can create junctions (for folders) and hardlinks (for files).
Why do you need this, as you may noticed XY can create hardlinks for files via Copy & Paste Special \ Create Hard Link(s).
But I felt not really happy with this implementation. And of cause, XY can create only hardlinks (this means files only).
How it works:
- 1. Just select a bunch of files and/or folders.
2. Goto another folder
3. Choose Virtual Paste
The Script detects files and folders automatically. And so will create junctions for the folders and hardlinks for the files.
- Run the Script as Menu from catalog or elsewhere
- Directcall to the subroutine-labels (Copylabel is "get" and Pastelabel is "set")
- Of cause you can assign CKS to UDC to have it right to your hands
What you need:
- This script (obviously)
- The ForEachItem-Script (foreachitem @ xyscripts but don't use this one use the one distributed with this thread because I've done some changes to get not only the FullName)
- junction.exe (creates junctions, http://technet.microsoft.com/en-us/sysi ... 96768.aspx)
- hstart.exe (starts applications totally hidden, http://www.ntwind.com/software/utilities/hstart.html)
- fsutil.exe (creates hardlinks, comes windows XP+)
Just search for this piece of code:
Code: Select all
$g_junction_exe = "C:\Programme\Tools\SYSINTERNALS\junction.exe";
$g_fsutil_exe = "fsutil.exe"; //this is allready in system32, its shipped with windows :)
$g_hstart_exe = "C:\Programme\Tools\hstart.exe";Replace
Code: Select all
$common = '$FEI_item = "{Fullname}"; load "'.$FEI_file.'", "'.$FEI_name;
// now turn the list of all selected items into a little script
$script = 'global $FEI_item; setting "LockTree", 1; ' . (($FEI_mixed == 1) ? report($common.'Item"; ', 1) : report("$common{Dir Folder|File}""; ", 1));Code: Select all
$common = '$FEI_item = "{Fullname}";$FEI_itemname = "{Name}"; load "'.$FEI_file.'", "'.$FEI_name;
// now turn the list of all selected items into a little script
$script = 'global $FEI_item, $FEI_itemname; setting "LockTree", 1; ' . (($FEI_mixed == 1) ? report($common.'Item"; ', 1) : report("$common{Dir Folder|File}""; ", 1));
Ahh XY has me, can't stop scripting, ahh...
XYplorer Beta Club