I try to move a file to trash. it is a bash file, extension .sh, sometimes it works sometime it does not.
no problems moving files to trash with other file extensions.
the weird problem is that the debugger shows the last error code of zero,
but in the script, I do a select case and the last error code is not zero,
would have liked to add a OS X screen shot ( name.png) to the message but don’t know how.
What are the permissions on the file, and where is it located?
How are you moving it to the trash? Are you using MoveFileTo or are you using the proper NSWorkspace declare?
the permissions are ok, the file is in my temp directory.
I use MoveFileTo, don’t know how to do it with NSWorkspace declare.
after I create that file, I set file permission to executable so the file can be run in a terminal.
as I mentioned, moving the file to trash using MoveFileTo sometimes work.
But the strange thing is the return code of the MoveFileTo function, the debugger shows zero and stepping through the code says 100, not found.