Giter Site home page Giter Site logo

danstis / rmstale Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 210 KB

rmstale is a tool to remove stale files recursively below a given directory. Files and folders older than a defined period are removed.

License: MIT License

Go 70.68% PowerShell 2.93% Dockerfile 9.71% Shell 16.67%
delete filesystem management command-line-tool hacktoberfest chocolatey

rmstale's Introduction

rmstale

Build Chocolatey codecov Quality Gate Status

rmstale is a tool to remove stale files recursively below a given directory.
Files and folders older than a defined period are removed.

Some examples for use:

  • Set on a schedule to clear old files from your temporary directories.
  • Set on a schedule to remove downloaded files from your downloads directory.

Install instructions

Install with Chocolatey

choco install rmstale

Install with Winget

winget install danstis.rmstale

Install rmstale manually

  1. From the GitHub releases page download the latest binary for your operating system.
  2. Place the downloaded file into your desired location.

Usage instructions

Command line flags

Flag Description
-a, --age Period in days before an item is considered stale
-d, --dry-run Runs the process in dry-run mode, no files will be removed.
-e, --extension Filter files for a defined file extension
-p, --path Path to a folder to process
-v, --version Displays the version of rmstale that is currently running
-y, --confirm Allows for processing without confirmation prompt, useful for scheduling

Usage examples

>: rmstale --version

rmstale v1.6.0
>: rmstale --age 14 --path c:\temp
WARNING: Will remove files and folders recursively below 'c:\temp' older than 14 days. Continue?: y

-Removing 'C:\Temp\amc2E40.tmp.LOG1'...
-Removing 'C:\Temp\amc2E40.tmp.LOG2'...
-Removing 'C:\Temp\amc306D.tmp.LOG1'...
-Removing 'C:\Temp\amc306D.tmp.LOG2'...
-Removing 'C:\Temp\amc308D.tmp.LOG1'...

GitHub project

Feedback, Issues, Bugs and Contribution to this tool are welcome.
For Bugs/Issues/Feature requests, please create an issue on the GitHub issues page.

Want to contribute? Great:

  • Fork the repo using the Fork button at the top right of the GitHub repo.
  • Clone the repo to your development machine, note the dependencies for this project are as follows:
    • Go version 1.19 or above
  • Create a new branch for the feature that you want to contribute.
  • Develop your new feature as you see fit.
  • Once you have a working copy of your code, create a pull request against this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.