Handy though folder structure of Mac may be, there can be times when you burry files in plenty of layers of folders which they it is not easy to find any more or deal with. For example, you can have a nest of old notes or photos or a decade’s worth of tax documents. Although you can wade through those folders manually to bring your to the surface, along with an Automator app you may make it all with an easy drag and drop. That the example which way:
Workflow set up
Launch Automator (Applications) and into the template chooser which emerges, select Application. Then add these actions to your workflow in such an order: Set Value of Variable (located under the Utilities heading), under Files and Folder heading find Get Folder Contents, Filter Finder Items (within Files and Folders), also in the Files and Folders Filter Finder Items and Move Finder Items to Trash.
Choose Set Value of Variable as the first action and select New Variable from the Variable pop-up menu. In the open window Variable Options enter an intuitional name as for example hostFolder and click Done. In the Automator select View -> Variables. Then there should appear your hostFolder variable in the list of variables at the workflow at the bottom.
Within the second action – Get Folder Contents – empower the Repeat For Each Subfolder Found option. Configure the next Filter Finder Items action to interpret Kind Is Not Folder. In the following action – Move Finder Items – just drag the hostFolder variable from the variables list at the foot of the workflow to the To pop-up menu so as its name emerges in the pop-up menu. Empower the option Replacing Existing Files in this action. Leave the following Get Folder Contents action as it is – without the option the Repeat for Each Subfolder Found checked. Then configure the following action Filter Finder Items to read Kind is Folder. And ultimately, leave the action Move Finder Items to Trash alone. Next name your workflow as for example “Subfolder Zapper” and then save it into the Desktop.
How to put it to work
While you drag a folder on to the applet of workflow, all items that are concealed in folders within that folder will be located at the root level of the dragged folder. So, for instance, if you drag folder X that includes Folders Y, Z and W – to the workflow, the files that are within these folders (together with the contents of the folders in those folders) will shift to Folder X. Then the workflow goes on to remove the empty Folders Y, Z and W.
Remember that the workflow works appropriately only in case you drag at a time one folder to the applet. Moreover, be warned that in case you have duplicated names of files, the files with duplicate names will be deleted.
- .NET Development
- Banking & Finance
- Communities & Social networks
- Custom App Development
- Development process
- Digital Marketing
- Drupal Development
- E-commerce & Retail
- IT Blog
- IT News
- IT News & Trends
- IT Outsourcing
- Java Development
- Media & Entertainment
- Medicine & Healthcare
- Product engineering
- Project & Resources planning
- QArea inside
- Software Testing
- Start-up Development
- Technology & Innovation
- Travel & Hospitality
- Useful Tips
- Web Design
Go Community: The Best Golang conferences of 2018 (and a few to look out for in 2019)Read more
From Gaming Videos to Redefining Instant Messaging: Quinn Hu's Long Path to Serial EntrepreneurshipRead more
7 Reasons to Truly Love MicroservicesRead more
The Best Languages for MicroservicesRead more
QArea's Year: Summing Up 2018Read more
What's New in Golang 1.11: Release Notes OverviewRead more
Why You Should Start Learning Dart and Flutter Right NowRead more
Golang Vs Python: Which Language Is Best for AI ProgrammingRead more