USB stick - Delete files and copy files


Please help with the following situation:

  • I insert a USB stick called LEXAR MEDIA (which gets mounted under /Volumes/LEXAR MEDIA)
  • KM will delete the following folders from this USB stick: .Trash, .Spotlight and Backup
  • KM will then copy a directory from my hard-disk to this USB stick; once finished, it will unmount the USB stick and send me a message to unhook it from the computer.


I get error while deleting hidden folders - error domain nscocoa error domain code=4

You might not have permission to delete the files.

Alternatively, since they are directories, unless you are using Recursive Delete (careful!) they will not be deleted.