Snippets Collections
set srcFldr to (choose folder with prompt "Select the source folder:")
set destFldr to (choose folder with prompt "Select the destination folder:")
tell application "Finder"
	--set fileList to files of srcFldr -- sorted by name in HFS Plus' fashion (?)
	set fileList to sort (get files of srcFldr) by name -- sorted by name in Finder's fashion
	set fileCnt to count fileList
	set ff to {}
	repeat with i from 2 to fileCnt by 2
		set end of ff to item i of fileList
	end repeat
	move ff to destFldr -- you can move list at once
end tell
star

Tue Mar 09 2021 17:18:08 GMT+0000 (Coordinated Universal Time) https://discussions.apple.com/thread/2323904

#applescript #sort #files

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension