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


Download files

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

Source Distribution

fs-walker-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

File details

Details for the file fs-walker-0.0.1.tar.gz.

File metadata

  • Download URL: fs-walker-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for fs-walker-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aa3d97f8e994971a7d41b8daf3019837aa2a415354e5640057d09929ebd5faf6
MD5 8d97b3f47db5de4e845a9a50e736adb2
BLAKE2b-256 9aa94ca80cd9498aa66b880e9b71544b1f3d9efd411a1773f51b3a398a46e7b8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page