Thursday, November 27, 2014

#1 2003-07-02 01:09:29 pm

julifos
Administrator
From: MalasaƱa, Madrid
Registered: 2002-11-20
Posts: 2014

Process recursivelly dropped files/folders X

You can use this set of handlers to process any files/folders dropped into your droplet.
It is very fast, because it uses the shell's command "find" to determine the entire hierarchy of files/folders dropped onto it.
This will process, too, invisible files.

OS version: OS X

Applescript:

on open aliasList
   repeat with i in aliasList
       repeat with x in paragraphs of (do shell script "find " & quoted form of POSIX path of i)
           set aliasIze to x as POSIX file as alias
           if (aliasIze as text) ends with ":" then
               processDir(aliasIze)
           else
               processFile(aliasIze)
           end if
       end repeat
   end repeat
end open

to processDir(dir)
   --> do whatever to this folder
end processDir
to processFile(thisFile)
   --> do whatever to this file
end processFile

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.026 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)