Re: Delete a hidden file
Re: Delete a hidden file
- Subject: Re: Delete a hidden file
- From: Luther Fuller <email@hidden>
- Date: Mon, 01 Nov 2010 11:31:19 -0500
On Nov 1, 2010, at 11:01 AM, Jason Lantz wrote: I asked this question before, but was unable to make any of the suggestions work. I think I need provide more detailed information, so I am trying again.
Objectives: 1. To delete a specific hidden file 2. For the script to work on any machine (aka absent of hard coded file paths) 3. To delete the file without requiring the user to directly choose or select the file
I had a couple of unused invisible files lying around doing nothing, so I tried this ...
set appSupAlias to (path to application support from user domain) tell application "Finder" try set fileAlias to (file ".9000143.plist" of appSupAlias) as alias -- error here if it does not exist delete fileAlias -- trashes the file if it does exist end try end tell
It seems to work correctly. One problem ... deleting with the Finder puts the file in the Trash. You might want to delete with System Events which simply makes the file disappear.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden