Friday, July 20, 2018

#1 2018-07-07 01:53:42 pm

From:: South Tirol
Registered: 2008-07-04
Posts: 557

Folder Action scripts and delay loop

Hi my friends,
Folder action scripts are an good old way to process items but the concept was never thought to the end

Now the unresolved old problem with this folder actions is how to add a smart delay loop able to process  files in batch.
Quantity and (quality)  or size change the delay just to talk about picture files, coming in from different devices like the phone, a stick or as download from the web
I'd like to have folder action script -folders to activate after the last item has been dropped into the designated folder.

Unfortunately, I have no idea how to build a smart delay loop.
Of course my script could wait for a long time but if the delay isn't dynamic I would have to wait forever every time I submit a bunch of files in different sizes.
Somebody who tried already and experimented the same issue? It's bothersome to get dialogs for each and every file I submit in a folder action scripts folder, when I need to process them all at once when all are physically available.

I'm happy about some brainstorming too smile

Last edited by Joy (2018-07-07 02:20:29 pm)



#2 2018-07-09 08:07:55 am

DJ Bazzie Wazzie
From:: the Netherlands
Registered: 2004-10-20
Posts: 2778

Re: Folder Action scripts and delay loop

So to get this straight, you want to hold the queue of the folder action itself so it can be filled by other files from difference devices and the user will start the queued folder action when he wants to (or started by an delay)?

I think the easiest way is to tag every file using folder actions and when the last item is added to the folder you'll process all tagged files and untag them when you're done. By tagging them you could use extended file attributes (xattr on command line) to add temporarily information. It's like the finder tags a file with with the value 'brokMACS' during copy, this way the interface knows to gray out a file even when copied by the Finder on another machine.



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)