tell application "Finder"
set cwd to POSIX file "/tmp/"
set win01 to make new Finder window
tell win01
set bounds to {0, 23, 200, 400}
set its current view to icon view
set its icon size of icon view options to 256
set its arrangement of icon view options to arranged by name
if its toolbar visible ≠ false then set toolbar visible to false
set its target to cwd
end tell
end tell
My problem: I can’t set the icon size an the arrangment options of the new finder window. The new window opens in different views.
Is it possible to limit the finder an view settings only to this specific path?
----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/12/12 04:30
# dMod: 2017/12/12 04:40
# Appl: Finder
# Task: Manipulate a Finder window and get the UI to update.
# Libs: None
# Osax: None
# Tags: @ccstone, @Applescript, @Script, @Finder, @Manipulate, @Finder, @Window, @UI, @Update
----------------------------------------------------------------
set tempLoc to path to favorites folder
set targetFolderPath to POSIX file "/tmp/"
tell application "Finder"
set newWindow to make new Finder window with properties {toolbar visible:false}
tell newWindow
set its target to targetFolderPath
set its bounds to {0, 23, 200, 400}
set current view to icon view
set its icon size of icon view options to 256
set its arrangement of icon view options to arranged by name
# Workaround for broken Finder — force the window to update.
set its target to tempLoc
set its target to targetFolderPath
end tell
end tell
----------------------------------------------------------------