/DownloadsCleaner

DownloadsCleaner is a utility that automatically deletes files in the Windows Downloads folder after a specified period of time passes while they are not modified, helping users maintain their system and avoid storing large amounts of unused files.

Primary LanguagePythonMIT LicenseMIT


Logo

DownloadsCleaner

DownloadsCleaner is a utility that automatically deletes files in the Windows Downloads folder after a specified period of time passes while they are not modified, helping users maintain their system and avoid storing large amounts of unused files
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

DownloadsCleaner is a utility that helps users maintain their system by automatically deleting files in the Windows Downloads folder after a specified period of time passes while they are not modified. By removing unused files, DownloadsCleaner helps users avoid storing large amounts of files that were intended to be used only once. With customizable options for setting expiration periods for different file types and generating log files, DownloadsCleaner is a flexible and powerful tool for keeping your system clean and organized. Plus, with the option to exclude certain files or folders from being scanned, you can ensure that important documents are never accidentally deleted. Whether you're a busy professional looking to streamline your workflow or a casual user trying to keep your system clutter-free, DownloadsCleaner is the perfect utility for you.

(back to top)

Getting Started

Setting up and using the portable version

  • Go to the repository's releases page and download the latest release.

  • Extract the downloaded files and place them in a folder other than the Downloads folder (e.g. C:\Users\[user]\Downloads Folder Cleaner is suggested).

  • Open the config.json file in a text editor of your choice.

    • The config.json file contains the following
      {
        "firstSetup": true,
        "freq": -1,
        "logs": true,
        "exec": [
            "",
            ""
        ]
      }
      
      • "firstSetup": Indicates whether this is the first time the configuration file is being set up. Set to false to prevent errors when the program starts.
      • "freq": Specifies the number of days a file must go unused before it is deleted. For example, to delete files in the Downloads folder that have not been modified for 30 days, set "freq" to 30.
      • "logs": If set to true, generates log files with details about the utility's operations.
      • "exec": Lists the names of any files or folders that should be excluded from the utility's scans.

    Configuring the utility to start automatically on Windows boot

    1. Press the Windows key + R to open the "Run" dialog.
    2. Type shell:startup and press Enter. This will open the Startup folder.
    3. Place a shortcut to the utility in the Startup folder. You can create a shortcut by right-clicking on the utility's executable file and selecting "Create shortcut" from the context menu.
    4. Close the Startup folder.
    • Now, the next time you boot your computer, the utility will start automatically.

    • Note: If you want to stop the utility from starting automatically when your computer boots, simply delete the shortcut from the Startup folder.

    Shutting down the utility

    1. Right-click on the DownloadsCleaner icon in the system tray.
    2. From the context menu, select "Quit" to close the utility and stop it from running in the background.

    Alternatively, you can use the Task Manager to close the utility. To do so:

    1. Press the Ctrl + Alt + Delete keys simultaneously, or right-click on the taskbar and select "Task Manager" from the context menu.
    2. In the Task Manager window, go to the "Processes" tab.
    3. Find the process for the utility and select it.
    4. Click the "End task" button to close the process and shut down the utility.

    Accessing the log file

    To access the log file for the utility, right-click on the DownloadsCleaner icon in the system tray and select "Open logs" from the context menu. This will open the log file in a text editor, allowing you to view the details of the utility's operations.

    Alternatively, you can locate the log file manually by going to the directory where the utility is installed and looking for a file named "logs.txt". You can then open the log file with a text editor to view its contents.

Usage

To configure the utility to delete files in the Downloads folder that have not been modified for 30 days, generate log files, and exclude a file named "important.docx" from being deleted, add the following to the config.json file:

  ```
  {
    "firstSetup": false,
    "freq": 30,
    "logs": true,
    "exec": [
        "important.docx"
    ]
  }

  ```

Explanation:

  • "firstSetup" is set to false to prevent errors when the program starts.
  • "freq" is set to 30, which means the utility will delete any files in the Downloads folder that have not been modified for 30 days.
  • "logs" is set to true, so the utility will generate log files with details about its operations.
  • "exec" is set to a list containing "important.docx", which means the utility will exclude any files named "important.docx" from its scans and not delete them.

Roadmap

  • An option to display notifications when the utility runs, or when it deletes specific files.
  • An option to automatically empty the recycle bin when the utility runs, to further help users keep their system clean.
    • An option to specify the directories that the utility should scan for files to delete, in addition to the default Downloads folder.
  • An option to specify different "freq" values for different types of files (e.g. images, documents, etc.), allowing users to set different expiration periods for different file types.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

If you have any questions, comments, or suggestions about the DownloadsCleaner utility, please don't hesitate to contact me at webcontact@ahmad-fawzy.com.

(back to top)