Here is a drop on that will process folders full of pov files and should
take care of folder inside folders:
Just copy and paste from here down into apple script and save as an
application:
property extension_list : {"pov", "inc", "map"}
property fileType : "TEXT"
property creatorType : "POV3"
-- This droplet processes both files or folders of files dropped onto the
applet
on open these_items
repeat with i from 1 to the count of these_items
set this_item to (item i of these_items)
set the item_info to info for this_item
if folder of the item_info is true then
process_folder(this_item)
else if (alias of the item_info is false and the name extension of the
item_info is in the extension_list) then
process_item(this_item)
end if
end repeat
end open
-- this sub-routine processes folders
on process_folder(this_folder)
set these_items to list folder this_folder without invisibles
repeat with i from 1 to the count of these_items
set this_item to alias ((this_folder as text) & (item i of these_items))
set the item_info to info for this_item
if folder of the item_info is true then
process_folder(this_item)
else if (alias of the item_info is false and the name extension of the
item_info is in the extension_list) then
process_item(this_item)
end if
end repeat
end process_folder
-- this sub-routine processes files
on process_item(this_item)
tell application "Finder"
set the file type of file (this_item as text) to fileType
set the creator type of file (this_item as text) to creatorType
end tell
end process_item
Post a reply to this message
|