Re: How to delete contents of folder in OS X?
Re: How to delete contents of folder in OS X?
- Subject: Re: How to delete contents of folder in OS X?
- From: Andrew Oliver <email@hidden>
- Date: Mon, 14 Jul 2003 20:22:12 -0700
A folder doesn't have a 'contents' property so what you're asking for is
essentially:
contents of (folder "NewOne")
Which returns 'folder "NewOne"' and you subsequently delete the entire
folder.
Instead try:
tell application "Finder"
-- no need to activate - this can all be done in the background
delete every item of folder "NewOne"
end tell
Andrew
:)
On 7/14/03 7:31 PM, "Jack Wenrick" <email@hidden> wrote:
>
The following script works fine in OS 9.2.2. The folder gets emptied as
>
instructed.
>
However, in OS X v10.1.5, the folder also gets sent to the trash.
>
>
The script:
>
>
tell application "Finder"
>
activate
>
delete contents of folder "NewOne:"
>
end tell
>
>
I have tried this on desktop folder (above), and folders on a disk
>
partition. Both give the same results. The folder gets trashed along
>
with the contents.
>
>
Thanks, Jack Wenrick
>
_______________________________________________
>
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.
_______________________________________________
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.