Re: move all desktop jpegs to a folder - OS X
Re: move all desktop jpegs to a folder - OS X
- Subject: Re: move all desktop jpegs to a folder - OS X
- From: "Marc K. Myers" <email@hidden>
- Date: Mon, 05 Nov 2001 11:38:50 -0500
- Organization: [very little]
>
Date: Sun, 04 Nov 2001 23:01:10 -0600
>
Subject: Re: move all desktop jpegs to a folder - OS X
>
From: Irwin Poche <email@hidden>
>
To: <email@hidden>, <email@hidden>
>
>
It looks like a selection can't be set on the OS X desktop. This script
>
doesn't use a Finder selection...
>
>
tell application "Finder"
>
activate
>
set theJPEGs to files in desktop whose file type is "JPEG"
>
if (count of (theJPEGs)) > 1 then
>
set newFolder to (text returned of (display dialog "Folder Name ?"
>
default answer "JPEG Folder"))
>
make new folder at desktop with properties {name:newFolder}
>
move theJPEGs to folder newFolder
>
end if
>
end tell
This is a little easier because it uses the "choose folder" command from
Standard Additions:
tell application "Finder"
set thePix to files of the desktop whose file type is "JPEG"
if thePix is not {} then
set theDest to (choose folder with prompt "Where should they go?")
move thePix to theDest
end if
end tell
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[11/5/01 11:38:19 AM]