If you manage to have a computer just to deal with it having Bridge opened on the "hotFolder", you can use Bridge to do that.
var listenerHotFolder = function( event ) {
// IMPORTANT: $.hiresTimer > 180000 this will make sure to trigger only once on cached folders like the hot folder, because when a file is detected it trigers twice (start building cache and finishing building cache).
if ( event.object instanceof Document && event.type == 'loaded' && $.hiresTimer > 180000) {
// only works if the active folder name is "hotFolder" case sensitive
if (app.document.thumbnail.name.toLowerCase() == "hotfolder") {
var myFiles_array = [];
// if doesn't exist, creates a subfolder to move the active processing files
var processingFolder = Folder(app.document.presentationPath + "\\processing");
if (!processingFolder.exists) processingFolder.create();
// You can change the image kind you want to deal with, or other file kind
var items = Folder(app.document.presentationPath).getFiles( function(f) { return (f instanceof File && f.name.toLowerCase().match(/\.dng|cr2|jpe?g$/) != null);}); // JPG | CR2 | DNG
for (var a=0 ; a < items.length ; a++) {
var copied = File(decodeURI(items)).copy( File(File(decodeURI(items)).path + "/processing/" + File(decodeURI(items)).name ) );
if (copied) {
$.writeln(File(File(decodeURI(items)).path + "/processing/" + File(decodeURI(items)).name ).fsName)
myFiles_array.push(File(File(decodeURI(items)).path + "/processing/" + File(decodeURI(items)).name ).fsName);
File(decodeURI(items)).remove();
}
}
app.document.thumbnail.refresh();
// if files were dropped on the hotFolder, and were collected, any script can be running on each file.
if (myFiles_array.length > 0) {
for (var a=0 ; a < myFiles_array.length ; a++) {
// here you can put your code
// this is just an exemple to test (you can delete this later:
alert("Processing the File:\n" + File(decodeURI(myFiles_array)).name);
}
}
}
//
return {
// FALSE + block last path repetition »» só repete o evento numa numa pasta (não repete em F5 ou em cache rebuild) Resumo: sá actua se navegar numa nova pasta
// TRUE + block last path repetition »» repete em várias situações: numa nova pasta, ao criar/apagar ficheiros/pastas no folder activo, ao reordenar a primeira vez (qd cria a primeira vez o file invisivel .bridgesort)
handled:true
}
}
}
app.eventHandlers.push( {handler: listenerHotFolder} );