Monday, July 23, 2018

#1 2003-07-02 11:59:24 am

From:: Malasaña, Madrid
Registered: 2002-11-20
Posts: 2014

Process recursivelly dropped files/folders

You can use this set of handlers to process any files/folders dropped into your droplet, which will search recursivelly every file and apply your code.
It is very fast, since it doesn't use the "info for" command to determine if the item is a folder or file.

OS version: Any


on open aliasList
   repeat with i in aliasList
   end repeat
end open

to processUnknownItem(thisItem)
   if (thisItem as text) ends with ":" then
   end if
end processUnknownItem

to processFolder(thisFolder)
   --> you can manipulate this folder adding code here
   set itemList to list folder thisFolder without invisibles
   repeat with i in itemList
       processUnknownItem(alias ((thisFolder as text) & i))
   end repeat
end processFolder

to processFile(thisFile)
   --> you can manipulate this file adding code here
end processFile



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)