I am trying this: Delete File “~/Volumes/Seagate/The Sims 2-backup”
This is the error from the engine log: 2024-07-27 06:54:48 Delete File action failed because source does not exists /Users/UserName/Volumes/Seagate/The Sims 2-backup in macro “Trying” (while executing Delete File “~/Volumes/Seagate/The Sims 2-backup”).
I have a Directory named The Sims 2-backup and it is in the top level of an External Drive named Seagate.
Anyone know what the correct syntax for the command is?
Umm This is the latest that I am trying:
Recursively Delete File “/Users/UserName/Volumes/Seagate/The Sims 2-backup”
Warning: This can be very destructive. Use caution.
Notify on failure.
This is the error message from the Engine Log file:
2024-07-28 20:19:22 Delete file /Users/UserName/Volumes/Seagate/The Sims 2-backup failed with “The Sims 2-backup” couldn’t be removed in macro “Back Up Sims 2 Folder” (while executing Recursively Delete File “/Users/UserName/Volumes/Seagate/The Sims 2-backup”).
Still does not work. Can anyone help with this?
I am basically trying to delete a directory on an external drive so that I can copy a newer copy of this directory from my iMac to the same external drive. I had a working macro using a previous version of Keyboard Maestro that was under El Capitan, but the newer version that I am using is under Catalina and so the particular commands that I need to use are different.
I tried your suggestion, it fails. Log entry for it is
2024-07-29 18:14:42 Delete file /Volumes/Seagate/The Sims 2-backup failed with “The Sims 2-backup” couldn’t be removed because you don’t have permission to access it in macro “Trying” (while executing Recursively Delete File “/Volumes/Seagate/The Sims 2-backup”).
So I checked the Permissions with Keyboard Maestro Editor and with the Finder, and both had me as having Read and Write Access and I am listed as owner with Keyboard Maestro Editor, so I don't understand the you don't have permission in the error. Anyone have any ideas?
Check the settings for the Seagate volume as well (the container of the file you are trying to delete). @griffman's "try deleting it in the Finder" is a quick way to do that -- you'll be asked for a password if you don't have write permission (eg it's a Time Machine volume).
Also check Settings->Privacy & Security->Files and Folders -- is there a "Removable Volumes" entry for Keyboard Maestro, and is it turned on?
I am using Catalina and I checked Settings->Privacy & Security->Files and Folders I don't have a a "Removable Volumes" entry. I do have Keyboard Maestro in Files and Folders and it has "Full Disk Access", is also in Full Disk Access.
I also checked the Settings for the External Volume Seagate, and it is a little strange as it has me listed as having "custom access" with read & write permission. Could this be the problem? How do I fix it?
BTW I do appreciate everyone's efforts on this. I have more questions involving my macro, but I figured the best way to get it working was to go step by step.
"Custom Access" implies that you've got "Ignore ownership" turned on:
But that only applies to the volume, not the contents.
You'll get the same "permission to access" error message if something within the folder you are targeting is locked, or if you don't have r/w permissions on that thing. And because it's the action that is failing it will refer to the action's target -- /Volumes/Seagate/The Sims 2-backup -- not the actual problem item.
Did you try @griffman's suggestion of testing by deleting in the Finder?
I checked the permissions on the folder on my internal drive and I checked the permissions on the folder on Seagate, in both cases it has me as having read and write permission. neither folder is shared nor locked.
I don't always delete the folder right away, I just drag it to the trash, but I did check and the Finder deleted everything just now without any issues.
Ahh I just read your note about a locked file again, and yeah I had a file that was locked inside the folder, so I am going to test to see if the action will now work. I suspect it will. I will let you know later.