The other day I happened to be in a hurry with the need to select some stuff on a Windows box from several different directories and put it on an usb key, while at the same time also having to transfer some other stuff from the usb key to the hd. "To save time" I started the first transfer, then I browsed the system to find other items, and started transferring them too while the previous one still had to complete, and so on. Needless to say, it worked, but... I far from saved any time, if you can say so! And I would like to write an "enque" tool designed explicitly to deal with these cases.
Perhaps an utility of the kind that I'm about to describe does already exist, but I would really like to roll my own, and I'm asking which (Windows specific) modules (and techniques) I should adopt to write it. Specifically:
- it should reside in the SendTo entry of the contextual menu;
- it should consist of two parts: a client and a server, with the latter being what I believe to be called a Windows service (I have seen them mentioned here every now and again, and I'll have Super Search help me...) and should be started by the former if not already running;
- the client should start some Windows selecting tool (i.e. not some GUI of my own like Tk, etc.) to choose a destination and communicate it to the server;
- the server should hold a list of currently running transfers with sources and destinations, and if it receives one involving drives which are already active, then it should enque (this is the perlishly easy part of the whole thing!) the new one to be done after all the other ones of the same kind are completed; or else, start it in parallel;
- the transfers should not be handled by perl, but by the Windows routine... you know, the one with the moving sheets of paper: I presume that it should be possible.
(Well, this is the simplest scheme that sprung to mind, but if anyone can think of an even KISSier one then it would be mostly welcome.)
Now, for each point above, please suggest modules and resources I should look into: e.g. when having to detect the involved drives, I'd naively use some regex based solution, but I suspect that there must be some more reliable library function out of some module I'd be use'ing anyway...
On a second thougth, I may add a minimal (in the strictest sense!) GUI to let one choose whether to move or copy files (but in both cases still handling the actual operation to the OS) but as a first experiment I'll stick with the latter choice.
Edit by tye to correct one <readmore> to </readmore>.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.