Re: Shell script to get a list of all subfolders inside a folder
Re: Shell script to get a list of all subfolders inside a folder
- Subject: Re: Shell script to get a list of all subfolders inside a folder
- From: Shane Stanley <email@hidden>
- Date: Tue, 13 Oct 2015 21:38:54 +1100
On 13 Oct 2015, at 9:31 PM, Christopher Stone <email@hidden> wrote:
How do you reduce it to posix paths?
Change this:
set thePosixPaths to theFolderInfos's valueForKey:(current application's NSURLPathKey) set theFolders to {} -- to store folders -- loop through converting POSIX paths to class furl repeat with i from 1 to count of thePosixPaths set end of theFolders to (item i of thePosixPaths) as «class furl» end repeat return theFolders
to:
set thePosixPaths to theFolderInfos's valueForKey:(current application's NSURLPathKey) return thePosixPaths as list
That last loop takes longer than the rest of the script.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden