file is busy
file is busy
- Subject: file is busy
- From: email@hidden
- Date: Wed, 14 Dec 2011 17:23:26 +0100
hi,
Situation:
File are on an server volume and need to be moved and deleted.
Files that are open by a user can be moved but not deleted.
I am not able to check first if the files are open without going into detail on this.
If File are open I get the message:
The operation can’t be completed because the item “whatever.pdf” is in use.
This should work, but for whatever reason the script never reaches the 'click button' part.
tell application "Finder"
try
move temp_file to folder FullPathDestination with replacing
delete temp_file
on error
tell application "System Events"
click button "OK" of scroll area 1 of window "Trash" of application process "Finder"
end tell
end try
end tell
Ideally would be just not to get a popup about the"file is in use" and just move on.
many thanks for any reply
/j
_______________________________________________
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