Consistent List View appearance across a folder and its subfolders

I’m trying to create a script to maintain a consistent List View appearance across a folder and its subfolders, including:

  • which columns are shown and which are not
  • their order
  • their width
  • which column is used for sorting
  • sort direction

The usage I’m thinking about is to export it from Script Editor as an AppleScript application and add to the Finder toolbar:

i

But the script doesn’t really work yet. Could someone help to finish it?

set aFolder to choose folder
set myThen to current date -- time checker
recursiveHandler(aFolder as list)

on recursiveHandler(theFolders)
  repeat with myFolder in theFolders
    tell application "Finder"

      tell front Finder window
        set currentTarget to its target
        set current view to list view
        set options to its list view options
      end tell

      set current view of (container window of (alias (myFolder as text))) to list view -- Options are (icon view/list view/column view)
      set folderList to folders of folder (myFolder as text)
      --activate
      delay 3

      tell application "System Events" to tell process "Finder" -- show columns
        tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
        delay 3
        repeat with boxName in {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"} -- column names
          if boxName is in {"Date Modified", "Date Created", "Size", "Kind", "Version", "Comments", "Tags"} then
            tell checkbox boxName of group 1 of window 1 to if value is 0 then click -- check desired columns
          else
            tell checkbox boxName of group 1 of window 1 to if value is 1 then click -- uncheck others
          end if
        end repeat
        delay 3
        tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
      end tell

      tell options
        set width of column name column to 250
        set width of column modification date column to 1
        set width of column creation date column to 1
        set width of column size column to 1
        set width of column kind column to 1
        set width of column version column to 1
        set width of column comment column to 1
        set width of column label column to 1

        set the index of column name column to 1
        set the index of column modification date column to 2
        set the index of column creation date column to 3
        set the index of column size column to 4
        set the index of column kind column to 5
        set the index of column version column to 6
        set the index of column comment column to 7
        set the index of column label column to 8
      end tell

      tell front Finder window -- workaround to refresh window to current column order
        set its target to container of currentTarget -- previous...
        set its target to currentTarget -- ...and back
      end tell

      delay 3
      set folderList to folders of folder (myFolder as text)
      my recursiveHandler(folderList) -- call this handler with the folders of this folder
    end tell
  end repeat
end recursiveHandler

There are two problems currently. The first one is that there is some error that simply prevents it from working properly.

The second is that I don’t completely understand how to make it work with the currently opened folder, instead of asking user to select it. This second problem is probably easier to solve.

john202307. There are many scripts out there that reset a Finder window, but your script is made much more complicated because it resets a folder and all of its subfolders and because your script uses GUI scripting which can raise timing issues.

Having said that and FWIW, I would take a different approach. I’ve removed a lot of stuff from your script just to get a basic approach that might work. The other stuff can then be added back.

The following script worked on my Sequoia computer. The script reports an error if there are more than 5 subfolders–this is just a precaution and can be changed to whatever you’re comfortable with.

--this script assumes that a Finder window is open to the target folder

tell application "Finder"
	set targetFolder to target of front Finder window
	try
		set theSubfolders to every folder of the entire contents of targetFolder
		if class of theSubfolders is not list then set theSubfolders to theSubfolders as list
	on error
		set theSubfolders to {}
	end try
end tell
set theFolders to (targetFolder as list) & theSubfolders
if (count theSubfolders) is greater than 10 then display dialog "This script will only reset 10 or fewer subfolders" buttons {"OK"} cancel button 1 default button 1 --set to desired value

repeat with aFolder in theFolders
	tell application "Finder" to set the target of Finder window 1 to aFolder
	resetFinderWindow()
	delay 1 --test smaller values
end repeat

tell application "Finder"
	set target of front Finder window to container of targetFolder -- previous...
	set target of front Finder window to targetFolder -- ...and back
end tell

on resetFinderWindow()
	tell application "Finder"
		tell front Finder window
			set current view to list view
			set options to its list view options
		end tell
		
		tell options --edit as desired
			set width of column name column to 250
			set width of column modification date column to 1
			set width of column size column to 1
			set width of column kind column to 1
			
			set the index of column name column to 1
			set the index of column kind column to 2
			set the index of column size column to 3
			set the index of column modification date column to 4
		end tell
	end tell
end resetFinderWindow
1 Like

This looked like an interesting script. I was surprised by the “set width of column name column to 250” but left it alone for the first try. Copied a folder out of my Documents folder to the desktop and opened it in Finder.

After the first run, I then changed the first set of numbers as so:

on resetFinderWindow()
	tell application "Finder"
		tell front Finder window
			set currentTarget to its target
			set current view to list view
			set options to its list view options
		end tell
		
		tell options --edit as desired
			set width of column name column to 10
			set width of column modification date column to 10
			--set width of column creation date column to 10
			set width of column size column to 10
			set width of column kind column to 10

But nothing seemed to change at all. From the first try to the last the window stayed the same (see screenshot). Any ideas, I’m on Sonoma 14.7.4.

But nothing seemed to change at all. From the first try to the last the window stayed the same (see screenshot). Any ideas, I’m on Sonoma 14.7.4.

At the beginning it was not one script but two. Here they are, work fine for me on Sonoma and Sequoia. Now when you see how it looked before, it might be easier for you to figure out how to merge them in a single one.

The first script. It enables list view and adjusts columns, their order and width:

tell application "Finder"
  tell front Finder window
    set currentTarget to its target
    set current view to list view
    set options to its list view options
  end tell

  activate
  delay 0.5

  tell application "System Events" to tell process "Finder" -- show columns
    tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
    delay 0.5
    repeat with boxName in {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"} -- column names
      if boxName is in {"Date Modified", "Date Created", "Size", "Kind", "Version", "Comments", "Tags"} then
        tell checkbox boxName of group 1 of window 1 to if value is 0 then click -- check desired columns
      else
        tell checkbox boxName of group 1 of window 1 to if value is 1 then click -- uncheck others
      end if
    end repeat
    delay 0.5
    tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
  end tell

  tell options
    set width of column name column to 250
    set width of column modification date column to 1
    set width of column creation date column to 1
    set width of column size column to 1
    set width of column kind column to 1
    set width of column version column to 1
    set width of column comment column to 1
    set width of column label column to 1

    set the index of column name column to 1
    set the index of column modification date column to 2
    set the index of column creation date column to 3
    set the index of column size column to 4
    set the index of column kind column to 5
    set the index of column version column to 6
    set the index of column comment column to 7
    set the index of column label column to 8
  end tell

  tell front Finder window -- workaround to refresh window to current column order
    set its target to container of currentTarget -- previous...
    set its target to currentTarget -- ...and back
  end tell
end tell

The second script. It applies list view recursively:

set aFolder to choose folder
set myThen to current date -- time checker
recursiveHandler(aFolder as list)
display dialog "Views change done in " & ((current date) - myThen) & " seconds." -- time checker

on recursiveHandler(theFolders)
	repeat with myFolder in theFolders
		tell application "Finder"
			set current view of (container window of (alias (myFolder as text))) to list view -- Options are (icon view/list view/column view)
			set folderList to folders of folder (myFolder as text)
			my recursiveHandler(folderList) -- call this handler with the folders of this folder
		end tell
	end repeat
end recursiveHandler

Hello, peavine! Thanks a lot!

One thing which I didn’t figure out in your version yet — even after uncommenting commented-out lines and fixing a typo in column order numbering — is how to make it apply visible/hidden columns and their width recursively. Currently, it seems it doesn’t work recursively.

FWIW, I also posted the two scripts which are a base of what I posted in the very first post.

john202307. I tested both of your scripts and they work fine. And, it certainly might be possible to combine the two scripts using a recursive handler to do the work. However, in my mind, a simpler and perhaps more conventional approach is:

  1. Get the target folder, which can be done either with a dialog or by getting the target of the front Finder window.
  2. Get a list of the subfolders in the target folder.
  3. For the target folder a) enable list view; b) enable/disable desired columns; c) adjust column order and width.
  4. Loop through each subfolder and a) enable list view; b) enable/disable desired columns; c) adjust column order and width.
  5. Refresh Finder window to see changes.

Is there some reason you want to use a recursive handler or do you see some error in my thinking as explained above? BTW, I edited my earlier script so that it works with no or multiple subfolders.

1 Like

Homer712. I’ve revised my earlier script. Would you test it as written to see if it changes the columns of the frontmost Finder window.

I guess I should have really asked, what part of the script adjusts the width of the various columns. I would have thought that changing the name columns width number from 250 down to 10, would have done something, but apparently it must be some other setting. Or is what I’m asking not possible?

I don’t know if this is helpful, or just clutter, but I rewrote my existing Finder-reset script to use the recursive approach employed in my script included earlier in this thread. I then tested the script on a target folder that contained 147 subfolders, and the script worked without issue (although this took some time).

--this script assumes that a Finder window is open to the target folder
--this script also assumes that visible columns are name, date modified, size, and kind

on main()
	tell application "Finder" --create a list that contains the target folder and its subfolders
		activate
		set targetFolder to target of front Finder window
		try
			set theSubfolders to every folder of the entire contents of targetFolder
			if class of theSubfolders is not list then set theSubfolders to theSubfolders as list
		on error
			set theSubfolders to {}
		end try
	end tell
	set theFolders to (targetFolder as list) & theSubfolders
	if (count theSubfolders) is greater than 10 then display dialog "This script will only reset 10 or fewer subfolders" buttons {"OK"} cancel button 1 default button 1 --set to desired value
	
	resetFinderWindow() --set the width and height of the Finder window
	
	repeat with aFolder in theFolders --set Finder window properties for each folder
		tell application "Finder" to set the target of Finder window 1 to aFolder
		resetFinderProperties()
		delay 0.5 --test different values
	end repeat
	
	tell application "Finder" to tell front Finder window --refresh Finder window
		set target to (path to public folder) --set to desired value
		set target to targetFolder
	end tell
end main

on resetFinderWindow()
	tell application "Finder" to tell window 1
		if not (exists) then error number -128
		set {x, y} to position
		set the bounds to {x, y, x + 1170, y + 700}
	end tell
end resetFinderWindow

on resetFinderProperties()
	tell application "Finder"
		tell Finder window 1
			set properties to {current view:list view, pathbar visible:true, sidebar width:200}
		end tell
		
		tell list view options of Finder window 1
			set properties to {calculates folder sizes:false, shows icon preview:false, icon size:small, text size:14, sort column:name column, uses relative dates:true}
			set properties of column name column to {index:1, sort direction:normal, width:0}
			set properties of column modification date column to {index:2, sort direction:normal, width:175}
			set properties of column size column to {index:3, sort direction:normal, width:100}
			set properties of column kind column to {index:4, sort direction:normal, width:175}
		end tell
	end tell
end resetFinderProperties

main()

Homer. Please see how column widths are set in my script immediately above. However, it’s important to note that column widths are constrained by some minimal values, and the width of the Name column is generally residual. In any event, and just as a matter of personal preference, I’ve found it best to set Finder window width, sidebar width, and column widths so that everything fits as you want. This takes a bit of testing, but you only have to do it once.

Thanks a lot! If I understand correctly, your version of my script doesn’t control which columns to show and which ones to hide, and to have this functionality, we need to put back the part with GUI scripting?

tell application "System Events" to tell process "Finder"
  tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
  delay 1
  repeat with boxName in {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"}
    if boxName is in {"Date Modified", "Size", "Kind"} then
      tell checkbox boxName of group 1 of window 1 to if value is 0 then click
    else
      tell checkbox boxName of group 1 of window 1 to if value is 1 then click
    end if
  end repeat
  delay 1
  tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
end tell

I tried to put it back, but for some reason it doesn’t work. Here it is, what is wrong here?

--this script assumes that a Finder window is open to the target folder

tell application "Finder"
  set targetFolder to target of front Finder window
  try
    set theSubfolders to every folder of the entire contents of targetFolder
    if class of theSubfolders is not list then set theSubfolders to theSubfolders as list
  on error
    set theSubfolders to {}
  end try
end tell
set theFolders to (targetFolder as list) & theSubfolders
if (count theSubfolders) is greater than 10 then display dialog "This script will only reset 10 or fewer subfolders" buttons {"OK"} cancel button 1 default button 1 --set to desired value

repeat with aFolder in theFolders
  tell application "Finder" to set the target of Finder window 1 to aFolder
  resetFinderWindow()
  delay 1 --test smaller values
end repeat

tell application "Finder"
  set target of front Finder window to container of targetFolder -- previous...
  set target of front Finder window to targetFolder -- ...and back
end tell

on resetFinderWindow()
  tell application "Finder"
    tell front Finder window
      set current view to list view
      set options to its list view options
    end tell
    
    activate
    delay 1
    
    tell application "System Events" to tell process "Finder"
      tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
      delay 1
      repeat with boxName in {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"}
        if boxName is in {"Date Modified", "Size", "Kind"} then
          tell checkbox boxName of group 1 of window 1 to if value is 0 then click
        else
          tell checkbox boxName of group 1 of window 1 to if value is 1 then click
        end if
      end repeat
      delay 1
      tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
    end tell
    
    tell options --edit as desired
      set width of column name column to 250
      set width of column modification date column to 1
      set width of column size column to 1
      set width of column kind column to 1
      
      set the index of column name column to 1
      set the index of column kind column to 2
      set the index of column size column to 3
      set the index of column modification date column to 4
    end tell
  end tell
end resetFinderWindow

john202307. I made two changes in the resetFinderWindow handler, and the script worked in several tests with up to five subfolders. Timing issues could easily arise, and you may need to test with different delay values. BTW, the error arose within the GUI scripting and I’m not sure why, although my knowledge of GUI scripting is very limited.

--this script assumes that a Finder window is open to the target folder

tell application "Finder"
	set targetFolder to target of front Finder window
	try
		set theSubfolders to every folder of the entire contents of targetFolder
		if class of theSubfolders is not list then set theSubfolders to theSubfolders as list
	on error
		set theSubfolders to {}
	end try
end tell
set theFolders to (targetFolder as list) & theSubfolders
if (count theSubfolders) is greater than 10 then display dialog "This script will only reset 10 or fewer subfolders" buttons {"OK"} cancel button 1 default button 1 --set to desired value

repeat with aFolder in theFolders
	tell application "Finder" to set the target of Finder window 1 to aFolder
	resetFinderWindow()
	delay 1 --test smaller values
end repeat

tell application "Finder"
	set target of front Finder window to container of targetFolder -- previous...
	set target of front Finder window to targetFolder -- ...and back
end tell

on resetFinderWindow()
	tell application "Finder"
		tell front Finder window
			set current view to list view
			# 			set options to its list view options
		end tell
		
		activate
		delay 1
		
		tell application "System Events" to tell process "Finder"
			tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
			delay 1
			repeat with boxName in {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"}
				if boxName is in {"Date Modified", "Size", "Kind"} then
					tell checkbox boxName of group 1 of window 1 to if value is 0 then click
				else
					tell checkbox boxName of group 1 of window 1 to if value is 1 then click
				end if
			end repeat
			delay 1
			tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
		end tell
		
		tell front Finder window
			# 			set current view to list view
			set options to its list view options
		end tell
		
		tell options --edit as desired
			set width of column name column to 250
			set width of column modification date column to 1
			set width of column size column to 1
			set width of column kind column to 1
			
			set the index of column name column to 1
			set the index of column kind column to 2
			set the index of column size column to 3
			set the index of column modification date column to 4
		end tell
	end tell
end resetFinderWindow
1 Like

Your latest script (Post #10) seems to work just fine, I would not need to adjust any settings. But, I picked up something strange. I’ve included screenshots.

Screenshot #1 is how the folder (Andersen Door) copied to my desktop starts out.

Screenshot #2 is after running the script.

At this point I decided to step backwards through the windows by clicking on the backwards arrow at the top left of the Finder window.

Screenshot #3 is the first window to come up. I have no idea how the “Public” folder and “Apple’s Drop Box” came to be in the sequence.

Screenshot #4 is the Window Photos folder.

Screenshot #5 is the Door Photos folder.

Screenshot #6 brings us back to the original Andersen Door folder.

Homer, I’m not Peavine, but could you explain, by using words, what exactly is wrong and where?

Can’t speak to what is possibly going on with the script, but I don’t understand how the folder “Public” or “Apple’s Drop Box” ended up in the sequence of folders.

Homer712. At the end of the script the Finder window has to be refreshed to show the changes that have been made by the script, and this is done by changing to another folder and back. My script changes to ~/Public because this folder seldom contains much if anything, and this is visually less intrusive. You can the folder to whatever your prefer.

The section of the script is:

tell application "Finder" to tell front Finder window --refresh Finder window
	set target to (path to public folder) --set to desired value
	set target to targetFolder
end tell
1 Like

Thank you for the explanation. If you change “seldom” to “never”, that would better describe my “Public” folder. So, we have a fully functional script. Thank you again.

1 Like

Yes, thank you very much, Peavine!

1 Like

I seldom change the visible columns in Finder windows, but I do occasionally, so I wrote a stand-alone version of john202307’s script that resets visible columns. I included a choose from list dialog at the start of the script for the rare occasion when I want to change my default columns.

This script has three potential issues. First, it requires several delays and getting these right can involve some tedious trial and error. Second, the script is slow, taking 2 seconds for each folder with the current delay values. Finally, the columns may not be in the desired order when the script has completed its work (I use a separate script to fix this).

On a more positive note, the script did successfully reset columns in a folder that contained 125 subfolders on my Sequoia computer. This took over 4 minutes, but there doesn’t appear to be an alternative that I’m aware of.

--this script is based on a code provided by john202307 in the MacScripter forum

set defaultColumns to {"Date Modified", "Size", "Kind"} --set to desired values
set allColumns to {"Date Modified", "Date Created", "Date Last Opened", "Date Added", "Size", "Kind", "Version", "Comments", "Tags"}

tell application "Finder" --get target folder
	if (exists Finder window 1) is false then error number -128
	activate
	set targetFolder to target of Finder window 1
	set targetName to name of targetFolder
end tell

tell me to activate --only if script is run from a script editor
set selectedColumns to (choose from list allColumns with title "Reset Finder Columns" with prompt "Select visible columns for folder \"" & targetName & "\" and its subfolders:" default items defaultColumns with multiple selections allowed)
if selectedColumns is false then error number -128

tell application "Finder" --make list of target folder and its subfolders
	try
		set theFolders to every folder of the entire contents of targetFolder
		if class of theFolders is not list then set theFolders to theFolders as list
	on error
		set theFolders to {}
	end try
end tell
set the beginning of theFolders to targetFolder
if (count theFolders) is greater than 20 then display dialog "This script will only reset 20 or fewer subfolders" buttons {"OK"} cancel button 1 default button 1 --set to desired value

repeat with aFolder in theFolders --loop through columns and make them visible/hidden
	tell application "Finder" to set the target of Finder window 1 to aFolder
	resetColumns(selectedColumns, allColumns)
end repeat

tell application "Finder" to set target of Finder window 1 to targetFolder --set Finder window to target folder

on resetColumns(selectedColumns, allColumns) --test different delay values 3 places
	tell application "System Events" to tell process "Finder"
		tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
		delay 0.5
		repeat with boxName in allColumns
			if boxName is in selectedColumns then
				tell checkbox boxName of group 1 of window 1 to if value is 0 then click -- check desired columns
			else
				tell checkbox boxName of group 1 of window 1 to if value is 1 then click -- uncheck others
			end if
		end repeat
		delay 0.5
		tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
		delay 1.0
	end tell
end resetColumns
1 Like

Hello again, thanks a lot! This script has a big importance to me.

Before you posted this updated version, I made some changes to your original code myself. Most of them are purely cosmetic, but what is important is that I changed the code of the tell options block. Before:

tell options
  set width of column name column to 250
  set width of column modification date column to 1
  set width of column size column to 1
  set width of column kind column to 1

  set the index of column name column to 1
  set the index of column kind column to 2
  set the index of column size column to 3
  set the index of column modification date column to 4
end tell

After:

tell options
  --set properties to {calculates folder sizes:false, shows icon preview:false, icon size:small, text size:14, sort column:name column, uses relative dates:true} -- optionally
  set properties of column name column to {index:1, sort direction:normal, width:100}
  set properties of column comment column to {index:2, sort direction:normal, width:1}
  set properties of column creation date column to {index:3, sort direction:normal, width:1}
  set properties of column kind column to {index:4, sort direction:normal, width:1}
  set properties of column label column to {index:5, sort direction:normal, width:1}
  set properties of column modification date column to {index:6, sort direction:normal, width:1}
  set properties of column size column to {index:7, sort direction:normal, width:1}
  set properties of column version column to {index:8, sort direction:normal, width:1}
end tell

Here is the whole version:

global mediumDelay
global shortDelay
global longDelay
set mediumDelay to 1 -- edit as necessary
set shortDelay to 0.5 -- edit as necessary
set longDelay to 2 -- edit as necessary

tell application "Finder"
  set targetFolder to target of front Finder window
  try
    set theSubfolders to every folder of the entire contents of targetFolder
    if class of theSubfolders is not list then set theSubfolders to theSubfolders as list
  on error
    set theSubfolders to {}
  end try
end tell

set theFolders to (targetFolder as list) & theSubfolders

-- optionally
set theSubfoldersMaxNumber to 10 -- edit as desired
if (count theSubfolders) is greater than theSubfoldersMaxNumber then
  display dialog "This script will only reset" & space & theSubfoldersMaxNumber & space & "or fewer subfolders" buttons {"OK"} cancel button 1 default button 1
end if

repeat with aFolder in theFolders
  tell application "Finder" to set the target of Finder window 1 to aFolder
  resetFinderWindow()
  delay mediumDelay -- edit as necessary
end repeat

tell application "Finder"
  set target of front Finder window to container of targetFolder -- previous...
  set target of front Finder window to targetFolder -- ...and back
end tell

display dialog "Done." buttons {"OK"} default button "OK" -- optionally

on resetFinderWindow()
  tell application "Finder"
    tell front Finder window
      set current view to list view
    end tell
    
    activate
    delay mediumDelay -- edit as necessary
    
    tell application "System Events" to tell process "Finder"
      tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
      delay mediumDelay -- edit as necessary
      repeat with boxName in {"Comments", "Date Added", "Date Created", "Date Last Opened", "Date Modified", "Kind", "Size", "Tags", "Version"}
        if boxName is in {"Date Modified", "Kind", "Size"} then -- edit as desired
          tell checkbox boxName of group 1 of window 1 to if value is 0 then click
        else
          tell checkbox boxName of group 1 of window 1 to if value is 1 then click
        end if
      end repeat
      delay mediumDelay -- edit as necessary
      tell menu item "Hide View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
    end tell
    
    tell front Finder window
      set options to its list view options
    end tell
    
    tell options -- edit as desired
      --set properties to {calculates folder sizes:false, shows icon preview:false, icon size:small, text size:14, sort column:name column, uses relative dates:true} -- optionally
      set properties of column name column to {index:1, sort direction:normal, width:100}
      set properties of column comment column to {index:2, sort direction:normal, width:1}
      set properties of column creation date column to {index:3, sort direction:normal, width:1}
      set properties of column kind column to {index:4, sort direction:normal, width:1}
      set properties of column label column to {index:5, sort direction:normal, width:1}
      set properties of column modification date column to {index:6, sort direction:normal, width:1}
      set properties of column size column to {index:7, sort direction:normal, width:1}
      set properties of column version column to {index:8, sort direction:normal, width:1}
    end tell
  end tell
end resetFinderWindow

So it seems the final step to make the version you have just posted nearly perfect is to update the tell options block, probably by borrowing this part from my version I have just posted! :slight_smile:

1 Like