 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
instantrunoff
Joined: 13 Jan 2008 Posts: 81
|
Posted: Thu Apr 03, 2008 5:46 pm Post subject: Folder2Junction: Moves Folder and Makes a NTFS Junction |
|
|
Folder2Junction 1.0
Updated 2008/Apr/5
Requirements: Windows Vista or higher (uses mklink command which is new to Vista). Can be used only on NTFS disks.
Description: Moves a folder to a new location, then makes a NTFS junction in the folder's original location pointing to its new location. NTFS junctions are like wormholes in the file system. Folder2Junction was created so that it would be easier to move sensitive files to an encrypted disk (for example, using TrueCrypt) while keeping junctions in the files' original unencrypted location to maintain ease-of-access and compatibility with applications.
Screenshot:
Cautions: Junction points are kind of a bizarre feature, and there may be strange or bad effects if used inappropriately. I encourage you to learn more about NTFS junctions before using this or similar utilities. Making junctions within junctions may be especially hazardous. Folder2Junction attempts a few safeguards: it will try to not let you move a "folder" that is already actually a junction; it will also refuse to move a folder to a location that already contains a folder of the same name; and it will verify the formation of a junction in the original location. If there is a problem with junction creation, Folder2Junction will ofter to move the folder back to its original location.
For more information about junctions and NTFS, there's a decent article on Wikipedia: http://en.wikipedia.org/wiki/NTFS_junction_point
For more on TrueCrypt (not affilated with Folder2Junction): http://www.truecrypt.org
Folder2Junction thread on the AutoHotkey forum: http://www.autohotkey.com/forum/topic30402.html
Acknowledgements: Created with AutoHotkey, Compile_AHK II, and Inno Setup, which are awesome. Icon is a squished version "Copy" by Kelli Shaver: http://DesignMagus.com Thanks too to converticon.com and IcoFX. Additional acknowledgements to Lexikos and many others on the AutoHotKey forum for teaching me about AHK, and to Hermann Schinagl for his Link Shell Extension and website that helped me learn more about hard links. If you want to do more with NTFS links or on earlier versions of NT-based Windows, his utility is very good and also free. Additional thanks to the makers of AutoHotkey and for providing autohotkey.net for hosting scripts like Folder2Junction. I'd like to also acknowledge all the software developers who make freeware; I've really appreciated it, and I'm glad I can for the first time contribute a freeware program of my own.
AutoHotkey: http://www.autohotkey.com
Compile_AHK II: http://www.autohotkey.com/forum/topic22975.html
Inno Setup: http://www.jrsoftware.org/isinfo.php
Link Shell Extension: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
Download Setup
Source (Source is also included with the setup package)
This is my first utility for Windows ever! If you have any advice, please let me know. I hope this is useful to somebody.
Last edited by instantrunoff on Mon Apr 07, 2008 12:15 am; edited 2 times in total |
|
| Back to top |
|
 |
instantrunoff
Joined: 13 Jan 2008 Posts: 81
|
Posted: Sat Apr 05, 2008 11:52 pm Post subject: |
|
|
2008/April/5
Updated description and made script more robust. Changed version number to 1.0, because it does everything I want it to do and version 0.2 sounded too unfinished.
Thanks. |
|
| Back to top |
|
 |
instantrunoff
Joined: 13 Jan 2008 Posts: 81
|
Posted: Mon Apr 07, 2008 12:16 am Post subject: |
|
|
| download link fixed |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Mon Apr 07, 2008 12:29 am Post subject: |
|
|
| This looks terrific (and well documented), but I am afraid of trying it in my main PC. I wait to see if others burn their fingers with it... |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 970 Location: London, UK
|
|
| Back to top |
|
 |
instantrunoff
Joined: 13 Jan 2008 Posts: 81
|
Posted: Mon Apr 07, 2008 12:58 am Post subject: |
|
|
Thanks for your support! About making it work on Windows XP/2000, I thought of employing Junction.exe by Sysinternals instead of the Vista-specific command mklink, but I was worried that people might have accidental deletes and the like too readily, because those versions of Windows, unlike Vista, do not have a junction-aware Explorer. Like I wrote here, when a junction is deleted in Vista's default shell, the target is untouched. Also, junctions in Vista have a telltale icon overlay, whereas they look identical to regular folders in XP. I believe that deleting a junction in Explorer under XP deletes the original folder.
The Link Shell Extension I mention above does have XP/2000 support, but the extension itself provides an icon overlay for pre-Vista Windows so the user can tell what's what. Further, the Link Shell Extension prevents accidental deletion: | Quote: | | Junctions can be deleted by using the Delete commands from Explorer as usual, if Link Shell Extension is installed, because Link Shell Extension implements a so called CopyHook handler, which intercepts Explorers Delete commands, and thus fixes Explorers problems with junctions. |
I'd be more willing to add support for XP/2000 if someone could help me figure out how to provide the icon overlay and a CopyHook handler like this other program, especially since Folder2Junction might be useful only to those now who have Vista without EFS (Home Basic and Home Premium) and are savvy enough to understand NTFS junctions. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|