Giter Club home page Giter Club logo

duplicate-file-remover's Introduction

Duplicate-File-Remover

A command-line tool that takes input directories and create an output directory containing only unique files from the provided input directories. The files are determined as being unique based on its content hash.

This program will only create a new specified output directory. Or if none is provided a directory in the path of the running application called output.

Installation

This application can be installed onto the command line with the following command:

go install github.com/Kilemonn/Duplicate-File-Remover@latest

Usage

The only required command line flag values into this program is the input directories, provided by multiple -i command line argument values. Optionally the output directory can be provided with -o.

You can get application usage by using -h or --help.

E.g.

Duplicate-File-Remover.exe -i input/directory/1 -i input/directory/2 -o output/directory

Example

Given the following input directories:

input1/
    |--> text.txt (content equal to input2/text.txt)
    |--> image1.jpg (content is unique across both directories)
    |--> test1.png (content equal to input2/test2.txt)

input2/
    |--> text.txt (content equal to input1/text.txt)
    |--> image2.jpg (content is unique across both directories)
    |--> test2.png (content equal to input1/test1.txt)

After running the following command:

Duplicate-File-Remover.exe -i input1/ -i input2/ -o output/

The output directory will contain the following files:

output/
    |--> text.txt (content is equal so only 1 is copied over)
    |--> image1.jpg (since content is unique across both directories)
    |--> image2.jpg (since content is unique across both directories)
    |--> test1.png (because the content is equal. Since "input1" was specified first in the command line arguments its file name will take precedence)

The contents of input1 and input2 remain untouched at the end of the file copying.

duplicate-file-remover's People

Contributors

kilemonn avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

marioseixas

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.