Re: Selecting newest file in folder
Re: Selecting newest file in folder
- Subject: Re: Selecting newest file in folder
- From: "Marc K. Myers" <email@hidden>
- Date: Thu, 25 Jul 2002 18:16:18 -0400
- Organization: [very little]
>
Date: Thu, 25 Jul 2002 12:16:13 -0600
>
From: B&P <email@hidden>
>
Subject: Selecting newest file in folder
>
To: Apple Script List <email@hidden>
>
>
I know this is probably really simple....
>
>
I want to be able to select the most recent file in a folder
>
(which has just been created by Filemaker) and move it to to
>
a subfolder. Can someone explain how to select such a file?
set theFldr to choose folder
tell application "Finder"
set theContents to sort items of theFldr by creation date
if not (exists folder "subFolder" of theFldr) then
make new folder at theFldr with properties {name:"subFolder"}
end if
move contents of item 1 of theContents to folder "subFolder" of theFldr
end tell
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[7/25/02 6:15:56 PM]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.