IT Blog, IT News,

Automator Workflow – Just Move Files From Subfolders

2 m read
QArea Expert
QArea Expert Marketing Manager
June 29, 2011
Share on
Reading Time: 2 minutes

 

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.

Tags
    Share on
    Privacy Preference Center
    Your Privacy

    When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

    Strictly Necessary Cookies Always Active

    These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.

    You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

    Performance Cookies

    These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site.

    All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

    Cookies used

    Google Analytics
    Functional Cookies

    When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

    Cookies used

    Test Second Test
    Targeting Cookies

    When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.

    More Information

    When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.