Folder Size Keeper is a GUI application that allows users to monitor folders on their systems and ensure that the folder sizes stay within defined limits. It can continuously monitor folder for changes and automatically delete oldest files to maintain the desired folder size. We have developed the application for cleanup of image files our vision systems constantly save on disk.
Download here:
To access this content you have to be looged in.
Getting Started:
Place the FoldersSizeKeeper.exe to folder where would you like to run it from and where it will have right to create a configuration file to save settings to.
Start the Application.
No window will appear at start – only a new tray icon will appear.
If there is already an instance running, you will get a notification and new instance will not run.
Application Icon:
When the application is running, an icon will appear in the system tray. Right-clicking the icon will provide options to open the application GUI or exit the application.
Using the Application:
Selecting a Folder:
Click on the „Browse“ button to choose a folder that you want to monitor. Or paste folder path to the input field.
Specify the maximum allowed size for the folder in the „Max Folder Size“ field.
Choose the size unit (GB, MB, KB) from the drop-down list next to the size field.
Subfolder Settings:
If you want to include subfolders for monitoring, check the „Include subfolders“ checkbox.
Once this is checked, you can specify a minimum size to keep for the subfolders.
This comes handy when you have multiple folders where some of the folders are used few times a year but others needs to cleaned very often,
but you would like to keep at least some files for each of the folder.
Choose the size unit for subfolders (GB, MB, KB) from the drop-down list next to the minimum size field.
Add Folder to Monitoring List:
After specifying all the settings, click on the „Add Folder“ button to add the folder to the monitoring list.
Modifying a Folder:
To modify the settings of a folder, double click the folder from the list. This will load the folder’s settings in the fields above.
Adjust the settings and click on „Modify selected“ to update.
AFTER „Modify selected“ IS CLICKED THE MODIFIED FOLDER STATUS CHANGES TO „Not monitoring“ – YOU WILL HAVE TO START MONITORING MANUALLY AFTER CAREFULLY REVIEWING THE MODIFIED CHANGES.
Removing a Folder from Monitoring List:
To remove a folder from the monitoring list, select the folder and click on „Remove selected“.
Starting and Stopping Monitoring:
To start monitoring a specific folder, select it from the list and click on „Start Monitoring Selected“.
To stop monitoring a specific folder, select it from the list and click on „Stop Monitoring Selected“.
To start monitoring all the folders in the list, click on „Start Monitoring All“.
To stop monitoring all folders, click on „Stop Monitoring All“.
THE STATE OF MONITORING IS SAVED IN folders_config.json FILE. ON APPLICATION START THE CONFIG IS LOADED AND MONITORING IS RESUMED FOR FOLDERS WHICH WERE MONITORED BEFORE EXITING THE APPLICATION.
Config Export/Import:
You can export your current configuration settings to a JSON file by clicking on „Export Config“.
To import a previously saved configuration, click on „Import Config“ and select the JSON file.
Exiting the Application:
To close the application window but keep the application running in the background, simply close the application window. The application will still run as a tray app.
To completely exit the application, right-click the application icon in the system tray and select „Exit“.
Since the application is keeping track of all the changes to the configuration in folders_config.json file, it will remember the last state of the application.
Notes:
If the path provided doesn’t exist, (or is moved, deleted or renamed during runtime process), when attempting to monitor the folder the application will switch
the state of the folder monitoring to waiting mode, until the folder appears, or until the monitoring is stopped manually.
The application checks for older files to delete based on their modification time.
If the application detects that a folder has exceeded the specified size limit, it will delete older files until the size limit is met.
The application ensures that, while deleting files, the size of subfolders does not go below the specified minimum subfolder size.
Troubleshooting:
Another Instance Running:
If there is an attempt to start a new instance of application, if one is already running, there will be a error windows displayed informing about this.
The application is using socket port 3151 to handle this. First instance will get hold to that port and new instance will not be able to bind to this port, that is why it will exit.
If some other application is holding the port 3151, not even first instance of our application will be able to run.
JSON Decoding Error on Config Load:
If there’s an error while loading the saved configurations from the JSON file, it’s possible that the file got corrupted. Check the contents of the JSON file for any inconsistencies.
If you are not able to fix the errors in the JSON file, you will have to delete/rename/move the file and when running the application, add all the folders you need to monitor again from scratch.
For development:
Adding a tag in format v*.*.* on git commit, configured automatic build action in github (.github/workflows/build.yml is config file for that) whould automatically build an exe file and creates a release with defined version.
For the application to be able to run on Windows 7 we had to use Python of version 3.8.10.
To install required modules you can use command (of course replacing the python installation folder path with yours and runnig in the folder of FolderSizeKeeper source code):
c:\Python3_8_10_win7\Scripts\pip install -r requirements.txt
To build the application on windows you can use this command:
c:\Python3_8_10_win7\Scripts\pyinstaller.exe –onefile –icon=icons8-broom-color\icons8-broom-96.ico –noconsole FoldersSizeKeeper.py