• 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: Move every other file to a new folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move every other file to a new folder


  • Subject: Re: Move every other file to a new folder
  • From: "Marc K. Myers" <email@hidden>
  • Date: Mon, 26 Jun 2006 04:24:13 -0400

On Sun, 25 Jun 2006 18:39:10 -0700, Bryan Mumford <email@hidden> wrote:
I'm new to Applescript. I need to move every other file in a folder
to a different folder, to reduce the number of files (sequential
photographs) in the  original folder. Can Applescript do this? Any
advice on getting started?

This is one way to do it:

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
	set fileCnt to count fileList
	if fileCnt > 1 then
		repeat with i from 2 to fileCnt by 2
			move item i of fileList to destFldr
		end repeat
	end if
end tell

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Intel UI scripting
  • Next by Date: Re: Currency Numbers
  • Previous by thread: Re: Move every other file to a new folder
  • Next by thread: Dabbling with EXIF
  • Index(es):
    • Date
    • Thread