"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn********************************@127.0.0.1. ..
"Noozer" <do*******@me.herewrote in
news:eW**************@TK2MSFTNGP06.phx.gbl:
>So... any software out there that will do this? If not, any pointers
on how I might be able to write a utility using VB6 or VB.Net?
I you want to write it yourself - you can use the FileSystem Monitor class
to inform your application of a change to the disk (in your case, dropping
a file in the directory).
While your smart folder idea seems "neat"... It doesn't seem practice. How
are you going to implement all the different business rules? i.e. Pictures
goes to the Picture folder, Readme.txt is unknown but HelloWorld.txt goes
to another folder? etc. etc.
Three ways so far... Filename matching (regex and Windows wildcards), file
extension and "File begins with 'xx xx xx xx xx' bytes. I'd also consider
more rules for processing ZIP files or directories dropped into a Smart
Folder, but haven't worked on the logic for them just yet.
Rules will be on a first match basis, or optionally, if the file matches
multiple rules it will create multiple copies (or only go to the first
matching rule and create shortcuts to any other matching rules). Rules might
even allow multiple destinations to allow for backup copies to be generated,
etc.
Each rule MUST have a destination location. Multiple rules can use the same
destination. A "Target not found! Create, Abort or Hold until target is
ready?" popup occurs if the target location is not available. The Smart
Folder would temporarily store the file(s) and watch for the destination
location to become available. Great for dragging stuff to, and then later
connecting a removable drive, or if you have network shares that aren't
always available.
The Smart Folder will also keep a log of just where it's put each file, so a
user can find a file if it doesn't end up where expected. Also keep track of
where the file came from, so a user can "restore" file(s) to their original
location later.
As far as the program itself... Windows will allow you to drag files and
drop them on an EXE for processing, providing a very simple trigger for the
program.
If the program is started without any command line parameters, it can assume
that the user simply chose to "open" the Smart Folder. This would show the
destination targets and allow access to settings, etc.
If the program is started WITH command line parameters, it can assume that
it is a list of files/folders/etc. that should be processed.
Yes, I've put a bit of thought into this... I just wish I knew enough VB,
C#, etc... to create the actual code. (What would be the best VS 2005
language to use for this, assume I was equally proficient in each?)
Thanks!