In Mac, there is the Smart Folder that allows you to sort and organize your files and folders. In KDE, there is the Magic Folder that can do the same thing.
Magic Folder is a plasmoid for KDE that enables you to organize your files effortlessly. All you need to do is to drag and drop the file(s) onto the Magic Folder and it will move them to the destination you have pre-defined. There is no limitation to the type of file that it supports. You just set the rules and it will work magically.
To use the Magic Folder, we have to first download it (a plasmoid file) from KDE-app.org and install it in your KDE system. (If you have no idea how to install plasmoid, here’s the detailed instruction)
After you have installed the plasmoid, drag the widget to your desktop. You should see a big folder as shown in the screenshot below:
Sorting your images files
Click the Magic Folder to open the configuration window. Click the first button (the file icon with a plus sign). From the dropdown, select “Image Files”.
You should see a list of all the image extensions available. Next, select the destination folder. This is the place where you want to store all your image files. That’s it. Whenever you drag and drop an image file to the Magic Folder, it will be moved to the destination folder you have defined. Similarly, you can do that with all video, audio and text files
Other than the default set of rules, you can also create your own rule. For example, you might want to sort all PDF files to your ebook folder. To do that, select “Anything” from the dropdown. At the regex field, enter “*.pdf” (without the quotes). Make sure that the “wildcard” box is checked. Lastly, select the destination folder. That’s it.
Other options that you can configure include whether the rule should be case-sensitive or not. In this case, “.pdf” is not the same as “.PDF“. Also, you can select whether it is a copy-only or to move the file over to the destination.
More powerful feature: Scripting
If you think the above features are all the capabilities of Magic Folder, then you are wrong. The most powerful feature of Magic Folder is that you can get it to run a script whenever you drag and drop a file onto it. For example, you can drop a zip file onto it and get it to run a script to unzip the file and sort the content within. While writing a script may be too technical a thing for most users, for power users, this can be a very handy tool. There is basically no limit to what you can do with it.
To get it to run a script, simply point the destination to the script and put a check beside the box “Destiny is a script”.
Our latest tutorials delivered straight to your inbox