Giter Site home page Giter Site logo

md5tool's Introduction

md5tool

Python script to generate or check md5 checksums recursively for files in a directory tree.

It has been tested for Python versions 2.7, 3.4, and 3.6.

Usage

To search recursively for files in a directory and its subdirectories, and check files against their corresponding .md5 checksum files:

md5tool.py check dir1 [dir2, dir3,...]

To generate .md5 checksum files for any files in a directory or its subdirectories which are missing them:

md5tool.py generate dir1 [dir2, dir3,...]

To display a help message to show the usage patterns above:

md5tool.py --help

Naming scheme for checksum files

This script assumes the following naming scheme for the .md5 checksum files

  • Each .md5 checksum file is stored in the same directory as the file for which that checksum was calculated.
  • Each .md5 checksum file is named the same as the file for which it is calculated, but with an additional ".md5" extension.
    • E.g. the checksum for dir1/myfile.mov should be stored in dir1/myfile.mov.md5

Basic instructions for Mac OS X

  1. Download the ZIP archive from github, or clone the repository with git.

  2. Place the md5tool.py script somewhere convenient, e.g. a scripts directory in your Documents folder.

  3. Open the Terminal program (in the Applications/Utilities directory on your Mac).

  4. Run the following command in Terminal to set permissions for the script (you only need to do this once).

    chmod a+x Documents/scripts/md5tool.py
    
  5. Type the following into Terminal to check files in a directory:

    ./Documents/scripts/md5tool.py check MYDIRECTORY
    
  • Replace MYDIRECTORY with the name of the directory you want to be checked.
  • To save time, you can drag and drop a directory from the Finder into the terminal window to specify the directory path.

Basic instructions for Microsoft Windows

  1. Windows does not have Python installed by default, so first download and install it from python.org.
  2. Next, it is necessary to update the Windows PATH variable so that python can be located from the command line.
  • Open the Control Panel from the Start Menu and go to:
    • System Settings
    • Advanced System Settings
    • Advanced Tab
    • Environmental Settings (extra menu at the bottom)
  • Add a new User Variable Path:
    • C:\Python27, C:\Python36, et cetera depending on Python version.
    • (If you have a different version of Python, adjust the path name accordingly)
  1. Download the ZIP archive from github, or clone the repository with git.

  2. Place the md5tool.py script somewhere convenient, e.g. a scripts directory on your C: drive.

  3. Open the Windows CMD program to get a command line window.

  4. Type the following into the command line window to check files in a directory:

    python C:\scripts\md5tool.py check MYDIRECTORY
    
  • Replace MYDIRECTORY with the name of the directory you want to be checked.

md5tool's People

Contributors

matt-grounds avatar jamessam avatar henryborchers avatar klipska avatar

Watchers

James Cloos avatar Fernando Cavero avatar

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.