• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Apple Script for File Selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple Script for File Selection


  • Subject: Re: Apple Script for File Selection
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 15 Jun 2010 08:57:12 -0700

Jesse,
Here's a snippet that could get you started.

It assumes that your files are named in a manner that the finder sorts correctly. (Not always a good assumption).



HTH,

ES

set myFolder to choose folder

tell application "Finder"
	set fileList to (sort files of myFolder by name)
end tell
set x to 1
set by3Files to {item x of fileList as alias}
set by2Files to {item x of fileList as alias}
set fileCOunt to the count of fileList
repeat
	set by2Count to (x * 2) + 1
	if by2Count > fileCOunt then exit repeat
	set the end of by2Files to item by2Count of fileList
	set by3Count to (x * 3) + 1
	if by3Count > fileCOunt then exit repeat
	set the end of by3Files to item by3Count of fileList
	set x to x + 1
end repeat
{by3Files, by2Files}

On Jun 14, 2010, at 9:44pm, Jesse Harris wrote:

> Hi,
>
> I am completely new to Apple Scripts, and I hope I'm not being rude - but is it possible to write a script which chooses every third file in a folder, and then a separate one which chooses every other file?
>
> I have done some very simple scripts like opening the finder window, assigning a reference etc etc.  However I then tried to accomplish the above and failed miserably.  Basically my first little scripts were the beginning pages to the Peachpit book Apple Scripts 1-2-3.
>
> Can this be done?  And how would I do it?
>
> This will be of tremendous aid to me, rhanks so much - and let me explain why; I am a time lapse photographer and must separate differently exposed files out of a folder for input to After Effects.  Some of the sequences have 4,000-plus files in them.
>
>
>
> All my best, Jesse
>
> http://www.jessedavidharris.com/
>
> 345 Park Avenue South #PH
> New York, NY  10010
>
> Cell:      917-334-7950
> Studio:  212-685-2458
>
> _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Apple Script for File Selection
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Apple Script for File Selection (From: Jesse Harris <email@hidden>)

  • Prev by Date: Re: Formating Problem
  • Next by Date: Re: Filemaker and Database events
  • Previous by thread: Apple Script for File Selection
  • Next by thread: Re: Apple Script for File Selection
  • Index(es):
    • Date
    • Thread