• 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 a sound file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move a sound file


  • Subject: Re: Move a sound file
  • From: Rob Jorgensen <email@hidden>
  • Date: Fri, 2 Aug 2002 09:20:47 -0400

On 8/2/02, Roger Jolly commented:

Hi Rob,

Howdy :-)


Sure it can. Do you mean something like this:

on open TheFiles
display dialog "Sure to move to sound folder?"
tell application "Finder"
set TheFolder to folder "System:Library:Sounds" of startup disk as
alias
set TheTempFolder to make new folder at desktop with properties
{name:"tempfolder"}
end tell
repeat with TheFile in TheFiles
tell application "Finder" to move TheFile to TheTempFolder
end repeat
set PathTheFolder to "\"" & POSIX path of TheFolder & "\""
set PathTheTempFolder to "\"" & POSIX path of (TheTempFolder as alias) &
"\""
do shell script "ditto -rsrcFork " & PathTheTempFolder & space &
PathTheFolder with administrator privileges
tell application "Finder" to delete TheTempFolder
end open

Yup, that's exactly what I needed. :-)


It's a bit rough, but you'll get the idea. I won't mention the bug in POSIX
path, I think you know ;-)

Yeah, some talented scripter explained it pretty clearly in the documentation included with this script:

<http://macscripter.net/sb_search.t?keyword=UTF8;Posix&go=Search> ;-)


But are you sure you want to put it in the System:Library:Sounds folder? Why
not use the one in your home folder ~/Library/Sounds?

I tried that but Eudora wouldn't see the sound file (aiff) when I placed it there. <shrug>


Hope this helps,

Roger

You bet! It works nicely! Thanks very much.

Rob


on 02-08-2002 00:50, Rob Jorgensen at email@hidden wrote:

Howdy,

I'm new to OS X and all of its inherent permissions hoops. I want to
create a droplet which will move a file to the system's Sound folder
so that it can be used by Eudora. When I attempt to do this in the
Finder, I get a dialog that says the folder can't be modified.

Can this be done with AppleScript and Terminal, or some other
combination that can be wrapped up in a droplet? If so, complete code
would be greatly appreciated.

> Thanks for whatever you might offer.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Move a sound file
      • From: Christopher Nebel <email@hidden>
References: 
 >Re: Move a sound file (From: Roger_Jolly <email@hidden>)

  • Prev by Date: Re: Simple Drag-n-drop action
  • Next by Date: Re: save documents problem (reprise)
  • Previous by thread: Re: Move a sound file
  • Next by thread: Re: Move a sound file
  • Index(es):
    • Date
    • Thread