You are here: Home >> Resource >> How to remove all files with specific extension in folder on Mac?

How to remove all files with specific extension in folder on Mac?

If your external hard drive needs to be used between Windows and Mac, have you noticed that the hard drive contains some hidden file extensions. Or have you ever encountered some application or malicious program creating some files with specific extensions in different folders and subfolders? Deleting files and folders is a basic file operation on a computer, but if you have hundreds or thousands of files scattered across different folders and subfolders, it's not that easy to delete them. In this article, we will discuss that how to quickly remove files with specific filenames and extensions in folders and subfolders on Mac?

remove file from folder

 

Use file command to remove files with specific filenames and extensions

 

Run Terminal app(/Applications/Utilities). If you're using macOS 10.15 and later, please add Terminal application to the Full Disk Access list(Open System Preferences -> Security & Privacy -> Privacy -> Full Disk Access.) For example, delete all files with extension .log in current Desktop folder Recursively (including sub-folders): find /Users/~/Desktop -name '*. log' type f -delete

dji drone

 

Use application to remove files with specific filenames and extensions

 

In addition to using command line tools, many applications also provide the same functionality. Here we recommend using PowerSuite, which not only provides more powerful deletion conditions, but also provides automatic deletion functions. Download and install PowerSuite on your Mac.

Run PowerSuite application, click Automatic tab on the left window, Click the “+” button under Custom cleanup objects, select the root folder where your files and folders belong, and then edit and choose the clean up rules. Such as delete duplicate files, file name contains the specific file name or extension, file creation date, file size and more. And Once you complete the deletion, you can click the "-" button to delete the folder to exit the cleanup rule.

 clean up files with specific filename and extension

Select the Auto clean up time frequency checkbox, and then choose the Deleted Time-Frequency option: Daily, 3 Days, Every Week, Two Weeks, Monthly, Two Months.

 auto clean up files with specific filename and extension

 

 

More Related Articles
Find and remove duplicate photos on MacOS Big Sur?

1. How to find and remove duplicate photos from Photos?

2. How to batch rename photos within the Photos app on Mac?

3. How to Remove Unwanted Startup Items on Mac?

4. How to fix macOS Finder slow after macOS update?

About Fireebok Studio

Our article content is to provide solutions to solve the technical issue when we are using iPhone, macOS, WhatsApp and more. If you are interested in the content, you can subscribe to us. And We also develop some high quality applications to provide fully integrated solutions to handle more complex problems. They are free trials and you can access download center to download them at any time.

Popular Articles & Tips You May Like
Five ways to recover lost iPhone data How to reduce WhatsApp storage on iPhone Clean up Your iOS and Boost Your iPone's Performance
Five ways to recover lost iPhone data How to reduce WhatsApp storage on iPhone How to Clean up Your iOS and Boost Your Device's Performance