Skip to main content

Walk your file system to check duplicate or missing files

Project description

Fs-walker

Walk your file system to check duplicate or missing files


You need space on your hard drive ?

Fs-walker can walk your file system and list all duplicated files you can safely remove as well as the space you can gain.

You want to give a new life to your old hard drive but you're not sure all its content has been saved on your new hard drive ?

Fs-walker can walk your two drives and list all files on the old one that are not present on the new one.

Install

From PyPI

To install Fs-walker from PyPI, just run:

pip install fs-walker

From GitHub

To install Fs-walker from GitHub:

  1. Run:
    git clone https://github.com/hoduche/fs-walker
    
  2. Inside the newly created fs-walker folder, run (with Python 3 and setuptools):
    python setup.py install
    

Run

As a command

Upon installation, Fs-walker adds two commands to the command line: duplicate and missing.

Running duplicate will:

  1. List all duplicated files and directories in a root directory passed as the --path (or -p) argument
  2. Save the duplicate listing as a duplicate_listing.json file in the root directory
  3. Print the potential space gain in Gigabytes

It can also dump the full listing.json and tree.json files in the root directory with the --dump-listing (or -d) argument. And if a listing.json file is passed as the --path (or -p) argument instead of a root directory, the listing is deserialized from the json file instead of being generated.

Example:

duplicate -p E:/AllPictures -d

Running missing will:

  1. List all files and directories that are present in an old root directory passed as the --old-path (or -o) argument and that are missing in a new one passed as the --new-path (or -n) argument
  2. Save the missing listing as a missing_listing.json file in the new root directory

It can also dump the full listing.json and tree.json files in the two root directories with the --dump-listing (or -d) argument. And if a listing.json file is passed as the --old-path (or -o) argument or as the --new-path (or -n) argument, instead of a root directory, the corresponding listing is deserialized from the json file instead of being generated.

Example:

missing -o D:/Pictures -n E:/AllPictures -d

As a Python module

import pathlib

import fs_walker.walker as fsw

folder_path = pathlib.Path('D:/Pictures')
listing, tree = fsw.walk(folder_path)

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fs-walker, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size fs-walker-0.0.1.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page