Re: move all desktop jpegs to a folder
Re: move all desktop jpegs to a folder
- Subject: Re: move all desktop jpegs to a folder
- From: Irwin Poche <email@hidden>
- Date: Sun, 04 Nov 2001 18:15:39 -0600
What you want to do is easily accomplished...
tell application "Finder"
set selection to (items in desktop whose file type is "JPEG")
if (count of items in selection) > 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 selection to folder newFolder
set selection to folder newFolder
end if
end tell
This will work in OS 9 but not in OS X. Paste it into Script Editor then
change the comma on the forth line to an opt-return character.
There's only two things that might go wrong. If you try to create a folder
with a name that already exists, the script will fail. If noting gets
selected (the script appears to do nothing) then the files you're interested
in aren't technically JPEG's. ResEdit could be used to determine the type,
which is case sensitive.
Any other questions, let me know.
-Irwin
>
From: Eric Maierson <email@hidden>
>
Date: Sun, 4 Nov 2001 17:45:07 -0500
>
To: email@hidden
>
Subject: move all desktop jpegs to a folder
>
>
does anyone have an idea how to do this? thanks
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users