• 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 all desktop jpegs to a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >move all desktop jpegs to a folder (From: Eric Maierson <email@hidden>)

  • Prev by Date: move all desktop jpegs to a folder
  • Next by Date: Re: move all desktop jpegs to a folder
  • Previous by thread: move all desktop jpegs to a folder
  • Next by thread: Re: move all desktop jpegs to a folder
  • Index(es):
    • Date
    • Thread