run a program for everytime a file is copied to a specified folder..
anyone have done a code like this?
if i have users that copies files to a local or network folder, i wanted this "copy" or "move" as a trigger to to run a program that would prompt the user to enter a "prefix" for their file (or files) so in the end, this program will place the 'renamed' file instead of the orginal file name(s).
user copy/move file: mysampleimage.tif
once the user copy/move this file to c:\source_directory\ a prompt will appear so user can enter prefix, e.g. user enters: ABC123 then the filename will be ABC123mysampleimage.tif
also, handling multiple file copy/move:
user copy/move *.tif (e.g. 10 files), then user enters: TEST123, then all the files will be named with TEST123 as prefix for the file names.
Re: run a program for everytime a file is copied to a specified folder..
There is a control that can monitor changes of a directory, a standard control (I forgot it's name, but you can find it in the toolbox)
When a user moves/copys a file, a file would be created on that folder in which the control will fire an event, you can then popup an inputbox and after that rename the file (which is done by file.move)