Re: Move a sound file
Re: Move a sound file
- Subject: Re: Move a sound file
- From: Roger_Jolly <email@hidden>
- Date: Fri, 02 Aug 2002 12:49:48 +0200
Hi Rob,
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
It's a bit rough, but you'll get the idea. I won't mention the bug in POSIX
path, I think you know ;-)
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?
Hope this helps,
Roger
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.