Trending September 2023 # How To Add A Delete Option To The Context Menu In Mac # Suggested October 2023 # Top 10 Popular | Uyenanhthammy.com

Trending September 2023 # How To Add A Delete Option To The Context Menu In Mac # Suggested October 2023 # Top 10 Popular

You are reading the article How To Add A Delete Option To The Context Menu In Mac updated in September 2023 on the website Uyenanhthammy.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested October 2023 How To Add A Delete Option To The Context Menu In Mac

If you are a Mac user, you will know that it doesn’t allows you to permanently delete files from the context menu. There is only an option “Move to Trash” that move your file to the trash and you have to manually empty the trash to delete the file. Wouldn’t it be great if you can add a “Delete” option in the context menu so you can quickly and easily delete the file/folder?

In terminal, we can easily delete (or remove) a file or folder with the command “rm“. Coupled with the “-rf” flag, we can get the system to forcefully delete a file or folder without prompt. In this tutorial, I will show you how you can make use of this command, together with Automator, to add a “Delete” option to the context menu.

1. Open Automator and select “Services”.

2. At the top of the right pane, select “files or folders” in “Finder”.

3. On the left most pane, select “Utilities” and drag the “Ask for Confirmation” option to the workflow. Enter the message to show up in the confirmation dialog.

4. Next, drag “Run Shell Script” to the workflow. Change the “Pass input” field to “as arguments”.

Paste the following lines into the shell script body:

for

f

in

"$@"

do

rm

-rf

"

$f

"

done

Binding a shortcut key to Delete file

An additional thing that you can do with this newly created “Delete” service is to bind a keyboard shortcut to it. You can then press the shortcut key to quickly delete the file.

2. Once you have set your shortcut key, you can press it after you have selected the file(s) and it will delete the selected file(s).

Enjoy!

Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

You're reading How To Add A Delete Option To The Context Menu In Mac

Update the detailed information about How To Add A Delete Option To The Context Menu In Mac on the Uyenanhthammy.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!