Thank you for your interest in Smart Files! The purpose of this program is to automate the movement of files that slowly but surely build up in your Downloads folder. As simple a task as it is, we all know it's a chore that would just rather not be done.
What our program does once you install it is it will move the files by extension into folders that match that group.
For example. If I have a ton of .png and .jpg files in my downloads folder, I can use the command smart-files run
and our program will automatically move those files into a media folder.
Or lets say I'm trying to download a thing from a website and macOS has already downloaded the .zip file and in my frustration of the installation not automatically starting I accidentally download the .zip file exactly one million times? I could use smart files to move all those files automatically into a software or other folder to keep my downloads file clean. Or what if you just don't have time to go into your downloads folder and move the files and the size just builds up over time?
smart-files run
works ad hoc, but that's still a manual process, isn't it? Which is why we've added time commands as well. We've utilized cron for Unix and Linux to move files based on frequency commands per minute, hour, day, and month. This will create a cronjob in your crontab based on which command you give it.
This program takes away the hassle of having to deal with the mess and reduces the clutter.
Unfortunately this program is compatible only with macOS and Linux at the moment. Windows users stay tuned!
We discovered while developing this project that macOS's security protocols will block access to cron trying to make changes but won't alert you. In order for smart-files to do its job, you need to give full disk access to cron. Please follow the instructions below
For Mac ver. 10.15.6 or greater:
-
In order for this module to work properly, we need to grant full-disk access for
cron
upon installation -
Open Finder and on the top-left corner of the screen, click "Go" and select “Go to folder"
-
Insert this to location:
/usr/sbin/cron
-
Select "Go" and locate
cron
-
Go to System Preferences and then to Security and Privacy
-
Navigate to Full Disk Access and click the lock at the bottom left to unlock
-
Drag
cron
from finder to the list of apps in Full Disk Access. Ensurecron
is checked prior to closing the window.
Additionally, we found that some people had trouble with installing with just pip install
so we recommend if that doesn't work to use pip3 install
- Run
smart-files cron
to display job frequency options. The result is displayed below:
Options:
-m, --minutes Will create a cron job for Smart-files to run every minute
-h, --hour Will create a cron job for Smart-files to run every hour
-d, --day Will create a cron job for Smart-files to run once every day
-o, --month Will create a cron job for Smart-files to run once a month
--help Show this message and exit.
- Add the desired command at the end of
smart-files cron
- For example, the command for running smart-files every minute would be
smart-files cron -m
- Verify that the crontab job exists by running the command
crontab -l
Note: Running a new smart-files job will overwrite the old smart-files job.
To sort files on an ad hoc basis:
- Run
smart-files run
- Check Downloads folder and verify that the files are sorted to their respective folders.
To display unsorted files:
- Run
smart-files show-files
- The files displayed are coming from the Downloads folder, excluding the folders smart-files creates