Code Monkey home page Code Monkey logo

rraf's Introduction

rraf

The Rimraf utility, written in Node (https://github.com/isaacs/rimraf), is a handy way to delete entire directory trees on Windows. "Normal" deletion tools provided by CMD, Powershell, Python or indeed window's built in file explorer GUI are unreliable as they choke on long path names (node_modules, I'm looking at you!), read only attributes or transient file locks.

Rimraf has the problem that it depends on Nodejs, which can be unacceptable in many environments. Furthermore, rimraf (and obviously nodejs itself) sprinkle unwanted files around the file system.

rraf, a stanalone Rust "port" of rimraf, is a single statically linked .exe file, so you can drop it anywhere.

Installation

Install rraf by downloading rraf.exe from https://github.com/vivainio/rraf/releases and putting it somewhere in your PATH.

Recipe:

$ cd C:\ProgramData\chocolatey\bin
$ curl -L -o rraf.exe https://github.com/vivainio/rraf/releases/download/v0.2.0/rraf.exe
$ curl -L -o handle.exe https://live.sysinternals.com/handle.exe 

Usage

Basic usage is just

rraf path_to_delete

In case the files are locked, rraf can use systinternals handle.exe to force the applications release the file handles (without killing the applications!). To use this feature, install "handle" from Chocolatey ("choco install handle") and provide "-c" argument (for "close"), like so:

rraf -c path_to_delete

rraf only works in Windows, as unix platforms don't generally have need for it due to less restricted PATH length and file system locking strategies.

To build it, you need to grab a nightly build of Rust and do "cargo build".

rraf's People

Contributors

vivainio avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

rraf's Issues

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.