Giter Site home page Giter Site logo

fukawi2 / ffiler Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 4.0 24 KB

File Filer; sort files into structured directory tree. Tree can be structured based on various designs such as date (file modification time), file hash, file prefix etc

Home Page: http://ffiler.info

License: MIT License

Shell 68.90% Makefile 2.07% Roff 29.03%
tree-structure filesystem sort-files organizer

ffiler's Introduction

ffiler

File Filer; sorts files into structured directory tree. Tree can be structured based on various designs such as date (file modification time), file hash, file prefix etc

Usage

Filing Method

There are various filing tree structures available:

  • Modified Timestamp
  • MD5 hash of file name
  • MD5 hash of file contents (slower)
  • Leading characters of file name
  • MIME type of file

Modified Timestamp

An example tree (directories only) filing to a depth of 2 (YYYY/Month/):

├── 2014
│   ├── 01-Jan
│   ├── 02-Feb
│   ├── ...
│   ├── 11-Nov
│   └── 12-Dec
└── 2015
    ├── 01-Jan
    ├── 02-Feb
    ├── 03-Mar
    ├── 04-Apr
    └── 05-May

By MD5 Hash

An example tree (directories only) filing to a depth of 2 characters:

├── 2
│   ├── 2
│   └── b
├── a
│   ├── 1
│   └── e
└── e
    ├── 1
    └── 7

By Filename

Similar to filing by hash, but don't bother to hash anything first (just take the first X characters of the filename).

An example tree (including files) filing to a depth of 2 characters:

├── e
│   ├── l
│   │   └── elephant
│   └── x
│       └── example
├── f
│   ├── f
│   │   └── ffiler
│   └── i
│       └── file
└── t
    └── e
            └── test

Mime type

An example tree (including files):

├── application
│   └── postscript
│       └── mylogo.eps
└── image
    ├── jpeg
    │   ├── mylogo.jpg
    │   ├── yourlogo.jpg
    │   └── herlogo.jpeg
    └── png
        └── hislogo.png

Filing Depth

Most of the filing methods require a depth for the resulting tree structure. Valid depths depend on the filing method.

For string-based methods (MD5 hashes or filenames) the depth is the number of characters (positive integer) to build the tree with.

Example: ffiler -ss -d2 (Sort to the second character as above)

For timestamp-based methods (modified time) the depth is the timestamp granularity:

  • y = Year (eg 2010/)
  • m = Month (eg 2010/01-Jan/)
  • d = Day (eg 2010/01-Jan/15/)
  • H = Hour (eg 2010/01-Jan/15/18/)
  • M = Minute (eg 2010/01-Jan/15/18/20/)
  • S = Second (eg 2010/01-Jan/15/18/20/34/)

Example: ffiler -sm -dm (Sort to the "month" level)

Action

ffiler can move (default), copy, symlink or hardlink files into the destination tree. The flags for these are:

-M  Move
-C  Copy
-L  Symbolic Link
-H  Hard Link

Installation

Arch Linux

PKGBUILD is in the AUR: https://aur.archlinux.org/packages/ffiler-git/

ffiler's People

Contributors

fukawi2 avatar vifon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ffiler's Issues

Input filtering

From /u/metamatic on reddit: "Options for how to deal with existing files or filter by datestamp might be useful. Then it could be used to copy digital photos from memory cards into a standard directory structure."

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.