Saturday, December 5, 2009

I download quite TOOOO much stuff on daily basis, but moving this content to the proper folders or locations is quite frustrating b'cuz it involves quite too much navigating, (max/min)imizing and of course CLICKING. Its my habit to organize stuff properly so that it'll be easier to find but this is quite difficult if you are organizing large, i mean Really Large amount of data. I wrote this script to sort my MESS and I hope it'll work for you too.
I'll explain the script later and if you dont know what AHK is....then read my previous posts and AHK's built in documentation.

Here goes the script. Copy the following into your AHK Script file.

;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Menu, pasteLoc, add, Audio, cAudio ;Add menu item Audio
Menu, pasteLoc, add, Anime, cAnime ;Add menu item Anime
Menu, pasteLoc, add, Games, cGame ;Add menu item Game
Menu, pasteLoc, add, EBooks,cEbooks ;Add Menu item EBooks


cAudio:
FileCopyDir, %clipboard%, F:\Audio\Personaly Downloaded\Current\%name%
return

cAnime:
FileCopyDir, %clipboard%, G:\Anime\%name%
return

cGame:
FileCopyDir, %clipboard%, G:\Game Installers\%name%
return

cEbooks:
FileCopyDir, %clipboard%, E:\E-Books\%name%
return

F1::
clipboard =
send, ^c
ClipWait
SplitPath, clipboard, name
Menu, pasteLoc, show
return

;||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

All you have to do is to select the folder by clicking it and press F1 key. A menu will show up with the predefined locations, click the one where you want to copy the folder and Yup that's all. No navigating through hundred of folders or anything.

Explaination:
A little explanation would be better here. First four lines create a context menu with items Audio, Anime, Games and E-Books. You can add more according to your needs like you may want to add another item for Movies or something. Next 4 text blocks are actually the actions which should initiate when you click the corresponding Item. For example when you click on item E-Books, 4th text block (or as we say in AHK a Label) cEbooks will initiate and your content will be copied to E:\E-Books folder.

After the four labels, we have assigned an action to our F1 key. Actions assigned ti io in plain English means that upon pressing F1, AHK will clear the clipboard hence removing any previously present content there. Then it sends KeyStroke Ctrl+C and then waits for the object to be copied in the clipboard. With this method Complete Name (Path+FolderName) is stored on the clipboard. By using splitPath we separate the folder name from the Complete Name. After doing everything listed above it SHOWS a menu, having items we specified in the first four lines of our script.

Customizing to your Needs:
Customizing is pretty easy instead of writing about it here I have wrote all the parameters in the script.

Limitation:
This script can be used to copy the folders only.


Download The Script (With Customization Guide)

No comments:

Post a Comment