Skip to content

This is a Python script that deletes files in a specified directory that are older than a certain number of hours. And Delete Them

License

Notifications You must be signed in to change notification settings

AmirTahaMim/OldFileGone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

OldFileGone

This is a Python script that deletes files in a specified directory that are older than a certain number of hours.

Installation

To use OldFileGone with Loop, simply download the oldfilegone.py file and save it to a directory of your choice. Make sure you have Python 3 installed on your system.

Usage

To use this script, follow the steps below:

  1. Open the OldFileGone.py file in a text editor.
  2. Modify the dir_path, loop_sleep_time and hour variables in the main() function to specify the directory path and the number of hours that files older than which should be deleted, respectively.
  3. Save the changes to the OldFileGone.py file.
  4. Open a command prompt or terminal and navigate to the directory containing the OldFileGone.py file.
  5. Run the script by typing python OldFileGone.py in the command prompt or terminal.

The script will run and delete any files in the specified directory that are older than the specified number of hours.

Features

  1. Automatically deletes files in a specified directory that are older than a certain number of hours
  2. Easy to use and configure
  3. Customizable directory path, time interval, and loop sleep time
  4. Lightweight and fast
  5. Compatible with Python 3

License

This script is released under the MIT license. See the LICENSE file for more information.

About

This is a Python script that deletes files in a specified directory that are older than a certain number of hours. And Delete Them

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages