You have to use AppleScript through NSAppleScript
:
tell application "Finder"
-- create a new finder window
set newWindow to make new Finder window
-- Alternatively you could use
-- set target of newWindow to folder "Macintosh HD:SomeFolder"
set target of newWindow to choose folder
-- get the options of that new window
set options to icon view options of newWindow
-- disable preview
set shows icon preview of options to false
close newWindow
end tell
I believe this information is stored in the .DS_Store files, but still the only save way of modifying it is through the Finder.
Georg
2009-08-09 20:29:29