property theUser : null property folderCount : 0 on run set theItem to choose folder start() process(theItem) finish() end run on open theItems start() repeat with theItem in theItems process(theItem) end repeat finish() end open on start() tell application "Finder" activate close every window end tell tell application "System Events" tell process "Finder" click menu item "Show View Options" of menu 1 of menu bar item "View" of menu bar 1 end tell set theUser to properties of application "System Events" set theUser to current user of theUser set theUser to properties of theUser set theUser to name of theUser set folderCount to 0 end tell end start on finish() tell application "Finder" close window 1 display dialog ((folderCount as string) & " folders/disks processed.") buttons {"OK"} default button 1 end tell end finish on process(theFolder) tell application "Finder" set theInfo to properties of theFolder -- Finder term: folder = «class cfol» set isFolder to class of theInfo is folder -- Finder term: disk = «class cdis» set isDisk to class of theInfo is disk set isReadable to false if owner of theInfo is theUser then -- Finder term: owner privileges = «class ownr» set ownerPriv to owner privileges of theInfo if ownerPriv is read write then set isReadable to true else if ownerPriv is read only then set isReadable to true end if else if group of theInfo is theUser then -- Finder term: group privileges = «class gppr» set groupPriv to group privileges of theInfo if groupPriv is read write then set isReadable to true else if groupPriv is read only then set isReadable to true end if else -- Finder term: everyones privileges = «class gstp» set everyonesPriv to everyones privileges of theInfo if everyonesPriv is read write then set isReadable to true else if everyonesPriv is read only then set isReadable to true end if end if set isAlias to alias of (info for theFolder) end tell if (isFolder or isDisk) and isReadable and not isAlias then set theItems to list folder theFolder repeat with theItem in theItems process(((theFolder as string) & theItem) as alias) end repeat tell application "Finder" set current view of container window of theFolder to icon view open theFolder set bounds of window 2 to {1, 44, 786, 465} set sidebar width of window 2 to 150 end tell -- Change icon views for this window only tell application "System Events" tell process "Finder" click radio button 2 of radio group 1 of window 1 end tell end tell tell application "Finder" set arrangement of icon view options of window 2 to snap to grid set icon size of icon view options of window 2 to 32 set text size of icon view options of window 2 to 12 set label position of icon view options of window 2 to bottom set shows item info of icon view options of window 2 to false set shows icon preview of icon view options of window 2 to false set background color of icon view options of window 2 to {65535, 65535, 65535} as RGB color end tell -- Change icon views to all windows tell application "System Events" tell process "Finder" click radio button 1 of radio group 1 of window 1 end tell end tell tell application "Finder" clean up window 2 by name set current view of container window of theFolder to list view end tell -- Change list views for this window only tell application "System Events" tell process "Finder" click radio button 2 of radio group 2 of window 1 end tell end tell tell application "Finder" set visible of column id modification date column of list view options of window 2 to true set visible of column id creation date column of list view options of window 2 to false set visible of column id size column of list view options of window 2 to true set visible of column id kind column of list view options of window 2 to false set visible of column id version column of list view options of window 2 to false set visible of column id comment column of list view options of window 2 to false set visible of column id label column of list view options of window 2 to false set sort column of list view options of window 2 to name column set icon size of list view options of window 2 to small set text size of list view options of window 2 to 12 set uses relative dates of list view options of window 2 to true set calculates folder sizes of list view options of window 2 to true end tell -- Change list views to all windows tell application "System Events" tell process "Finder" click radio button 1 of radio group 2 of window 1 click button 2 of window 2 end tell end tell tell application "Finder" close window 2 end tell set folderCount to folderCount + 1 end if end process