This is a tutorial / answer / HOWTO
HOWTO: Enable Drag and Drop file and folder move onto ANY drive or folder dock item.
Overview and Why This HOWTO
If your reading this post / HOWTO chances are you are looking for the same feature and solution I was when I decided to take on this little project.
What I wanted to accomplished and now have a solution for...
1st - I wanted to be able to create custom icons on my ObjectDock for folders and Drives (easy enough).
2nd - I wanted to be able to drag and drop any file, shortcut, folder, etc. onto these new Icons and have it moved into whatever Folder or Drive that the icon on the ObjectDock represented.
3rd - I wanted the File, Folder, Shortcut, etc. moving process to show a progress bar in the Windows GUI and not a dos console / txt window that displayed moving files, etc..
I searched Google, forums, etc. looking for a solution already in place. Keep in mind I was already up for 24 hours when I began this project so I may have missed someone's solution that already solved these tasks - If I did!?! - OOPS! - Someone point me to their project! If not and you want to accomplish the above tasks too! Pull up a chair - this is easier than you think! Let's begin!
I thought about a few different solutions - but I decided to rollback to a project I did awhile ago with hidden DOS batch files to accomplish tasks and open windows without the user even knowing they were there.. So here is what we need to get started with my solution!
1. We are going to need the command line utility that will HIDE our command prompt / batch files from the user's eyes. Face it! No one wants to see a command prompt window popup every time you drag or drop to your ObjectDock items! To solve this we use a little program called "Hidden Start" or aka "hstart" - you can download this for free from their website at http://www.ntwind.com/software/utilities/hstart.html (scroll down to the bottom of their page) Just download it for now - I'll walk you through where to install it later in this HowTO.
2. The final software requirement (besides already having ObjectDock running and working) - is a nice GUI file / move / copy / + more utility - that can do a heck of a lot more than what we are using it for. You can even use it to replace the default windows copy / cut / paste file functions! (I did!) The program I'm speaking of is "TeraCopy" there is a "Free for Home Users" version available on their website. Visit http://www.codesector.com/teracopy.php - Download the latest beta version if available - When I wrote this, version 2.0 beta 3 was available. (this even worked on my vista64 machine).
Once the above requirements are downloaded - we are ready to install!
Installation of the Required Utilities
First up, we are going to need a nice and out of the way place to store our "hstart" utility and custom batch file we will be using to create our Dock items from. I used "C:\Program Files\ObjectDock Assets". Navigate to your C:\Program Files folder, and create a new folder called "ObjectDock Assets".
Once the new folder is ready - navigate to where you downloaded Hidden Start "hstart" and double click and open the compressed ZIP file. For this project I used the 32bit version of hstart.exe, if you have XP64 or Vista64 Feel free to modify my instructions to use the hstart64.exe version that is also included in the hstart zip file. Extract the hstart.exe file to "C:\Program Files\ObjectDock Assets" (or just simply copy and paste the hstart.exe file from the .zip archive to the ObjectDock Assets directory we created earlier).
That's all we need to do for now with hstart! Now - onto TeraCopy!
Ok - To install TeraCopy - just double click and follow the instructions of the file you downloaded earlier. Mine was named teracopy2b364.exe ( I did install this version to both my 32bit XP machine and 64bit Vista64 machine without any problems). If you change the default installation directory for TeraCopy you will need to modify the batch file we create later on to point to your custom path - to keep it simple just use the default! Once the installation is complete you can click on the open/launch TeraCopy checkbox and click finish. By default TeraCopy installs itself as the default Copy Handler for windows - which replaces the file copy / move that comes with windows. (You can revert back to windows default if you like by clicking on the "more" button then "menu", "Options"). I left TeraCopy as my default and I'm so glad I did! - Give it a shot you won't be disappointed! and if you do find it as useful as I did - do what I did and buy yourself a copy to support the developer! Once your done tinkering around with the options - close the TeraCopy window and lets get on with the last step of installation!
Finally - we create a little DOS batch file to bring it all together!
Open up notepad and copy and paste the following code (you will only have to modify this if you changed any of the default installation directories).
IF %_testvar%==. GOTO OPENDIR
hstart "C:\Program Files\TeraCopy\TeraCopy.exe Move %2 "%1"
Basically what this little beauty does is read in the variables that are passed to it from ObjectDock when you click or drag and drop something onto your dock icon. First it checks to see if you are dropping something onto it. If you are not then it realizes you only clicked on the icon and instead it will open the directory or drive its assigned too in a fresh windows explorer window. If you did drag a file or directory onto the dock icon the batch file will instruct TeraCopy to open in it's own process GUI and move the item you are dropping into the directory or drive the dock icon is assigned. We assign the directory or drive in the next and final step when we setup the ObjectDock Dock Item/Icon itself.
Once you have the exact code in notepad - click the file option, then "Save As". You can navigate to our ObejctDock Assets directory - or you can just enter: C:\Program Files\ObjectDock Assets\folderlnk.bat into the File name field. Don't forget to set the "Save as type" to "All Files (*.*)" or you will end up with a .txt at the end of your batch file name. Once you have everything set - click "Save" and then you may close notepad.
This is it! The final step! Let's create a dock item!!
Repeat this step for every folder or drive dock item you would like to have drag and drop ability for.
Start up ObjectDock if you haven't already! Now right click on your Dock and select "Add Entry", then "New Shortcut".
Enter the title of this Dock Item, then for the "Link" field enter the following:
C:\Program Files\ObjectDock Assets\hstart.exe
(No Quotes, Just exactly like shown).
Next in the "Arguments" field is where you will point to the directory or drive you are creating this particular Dock Item for enter:
/NOWINDOW "folderlnk.bat "C:\"
(We are creating a Dock Item for Drive C: - To create a Dock Item for another location replace the C:\ with your own path - Make sure the quote's are exactly like this example - There are a total of 3 for this filed).
You may leave the "Start in:" field blank and leave the Run: selection set to "Normal Window". Now - Change the image to a fancy Icon you have and then click OK.
You now have yourself a nice directory or drive DOCK Icon/Item that you can drag and drop onto or click to access!!
A few rules to make it work correctly!
1. You must have "Icon Dragging" enabled on your dock for this to work! (Right click on your Dock then click "View" and make sure "Lock Icon Dragging" is NOT checked). The current version of ObjectDock will disable any dragging onto Dock Icons/Items if Icon Dragging is disabled! - Hopefully this changes in the future version with a way to disable dragging the icons but still keeping drag 'n drop enabled!
2. When dragging onto Dock Items - be sure your mouse pointer is center with the item you are dropping onto. If the Icon slides away then you are going to make a shortcut for the item you are trying to move!
Thanks for using this tutorial! Hope you found it useful and everything worked for you! Feel free to discuss under the official thread in the Stardock Support forums.. If you modify or change any of the work I did here and re-distribute all I ask is that you just give me a mention! If this really saved you some headaches feel free to send me a donation via paypal to email@example.com
Thanks again for reading!
D2 GLOBAL INC