Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ffcd

ffcd (Fast Filename-based Compare Directories) is a python-based fast recursive directory comparison tool that compares by filenames and directory names only (i.e. not by modification time, size, or content). For use in shell scripts, it can output cp commands to sync the directories either from source-to-target or bidirectionally.

Features

  • The comparison is case-insensitive for both the filename base and the filename extension (somefile.txt and SomeFile.TXT are not flagged as different files)

  • The list of mismatched files/dirs is sorted and indexed for a much faster comparison method than python's native filecmp.dircmp function (roughly 100x as fast a shallow compare)

  • The code contains a customizeable ignorelist to remove metadata litter files (such as .DS_Store or desktop.ini)

Usage

ffcd.py /path/to/sourcedir /path/to/targetdir -- outputs a list of files or subdirectories found ONLY IN SOURCE or ONLY IN TARGET

ffcd.py -s /path/to/sourcedir /path/to/targetdir -- outputs the cp commands to sync source directory files and subdirectories to the target directory

ffcd.py -f /path/to/sourcedir /path/to/targetdir -- outputs the cp commands to bidirectionally sync files and subdirectories between both the source and the target directory

ffcd -h, --help -- help

Limitations

Throws a type error when one directory contains a filename that is the same as a directory in the other directory.

Use filecmp/dircmp instead when a comparison by more than the existence of the same filenames is necessary

About

Fast Filename-based Compare Directories is a python-based fast recursive directory comparison tool that compares by filenames and directory names only (i.e. not by modification time, size, or content). For use in shell scripts, it can output cp commands to sync the directories either from source-to-target or bidirectionally.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages