Skip to content

A console application that recursively removes any file that has not been modified in a given number of days.

License

Notifications You must be signed in to change notification settings

djoslin0/DirectoryCleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DirectoryCleanup

A console application that recursively deletes any file that has not been modified in a given number of days and any empty subdirectory. Deleted files and subdirectories are moved into the recycle bin.

This was created in order to keep my downloads folder and desktop from continously growing, and to encourage me to organize my files properly.

Usage

By default, the program will remove any file that has not been modified in 7 days, and any empty subdirectory.

Simply call the program with a directory as the parameter:

DirectoryCleanup "c:/your/path/here/"

Alternatively, you can specify the number of days with the -d parameter.

Here is an example that will remove any file that has not been modified in 10 days, and any empty subdirectory:

DirectoryCleanup -d10 "c:/your/path/here/"

I recommend that you run the program as a scheduled task, otherwise you will have to run the program manually every time you want to clean a particular folder.

Download

Download the compiled application

About

A console application that recursively removes any file that has not been modified in a given number of days.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages