I have two users in my machine , One is Admin where the eggplant is installed, other user is eggplant1 which is my SUT.
when i ran the script to lanch an application in my SUT , it will create a “IS&T Software Update” folder in my eggpant1 user in the below path i.e.,
Users/eggplant1/Applications/IS&T Software Update
when i try to delete the folder “IS&T Software Update” using delete folder iam getting the following message ************
Failed to delete file or folder Users/eggplant1/Applications/IS&T Software Update (Error: Error removing)
I want the script to grant read+write access for the folder “Users/eggplant1/Applications/IS&T Software Update” to admin user for deleting …
Can any one help me out to achieve this …
Please let me know if you need any further information in explaining my scenario …
Thanks in Advance…
I’d probably use the “shell” command and do a sudo rm to delete the file.
The first thing I’d do is make sure your path is correct. The error message “Error removing” isn’t very specific about what the problem is. You’ll get that exact error if the file or folder you’re trying to delete doesn’t exist. You can check it before deleting like this:
set softwareUpdateFolder to "/Users/eggplant1/Applications/IS&T Software Update"
if there is a folder softwareUpdateFolder then
delete folder softwareUpdateFolder
logWarning "No such folder: " & softwareUpdateFolder
If that’s not it, then looking at permissions may be helpful:
put the permissions of folder softwareUpdateFolder
Then you can use Matt’s suggestion if needed to clobber the folder with a big stick. (Use caution with that one, or with SenseTalk’s delete command – either one can be more destructive than you want if you have the wrong path!)