Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Dialog via filename extension?



-boo
wondering if an answer is a recursive cron job to fix all *.scpt files

May I suggest this one, to find out every *.scpt in a selected folder as alias list?

-- choose the folder
set tarPOSIX to quoted form of POSIX path of (choose folder)

-- without error trapping
-- briefly, find recursively in the selected folder, every items with the name ends with '.scpt' set y to every paragraph of (do shell script "find " & tarPOSIX & " -name '*.scpt'")

-- make a list of alias
set aList to {}
repeat with i in y
set end of aList to (contents of i) as POSIX file as alias
end repeat

Then loop thru aList & ask Finder to change the file type, I guess you know how to do this part ;-)

The shell command 'find' is helpful, do searching recursively & IMO, reliable than Finder's entire contents.


bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.