Git Product home page Git Product logo

file_organizer's Introduction

File Organizer

File organizer is a CLI application that will sit in the background, watch a directory and organize new files that are added as they are added. This is typically used as a "service" in linux or "launchd" on mac os.

Watcher a directory and organizes your files. Defaults to organizing by type

Usage:
fo [flags]

Flags:
-x, --exclude-pattern string      if set will exclude file from being organized if it matches regex pattern
-h, --help                        help for fo
-d, --organize-by-date-and-type   this will organize a parent folder into sub folders of dates added and then sub-sub folders of type
-t, --organize-by-type            this will organize a parent folder into sub folders based on file extension
-l, --organize-by-type-and-date   this will organize a parent folder into sub folders of types and then sub-sub folders of date added
-m, --sample-millis int           how often the watcher will check for new files and move them (default 1000)
-f, --type-folder-suffix string   for the type created folders this will be the suffix (default "_files")

Organize by type

Organizing the directory by type or -t will put all files in the folder into sub folders based on their file extension. If the file extension is empty or unknown the value "unknown" will be used.

* Downloads
  * jfr_files
  * txt_files

Organize by date and type

Organizing by date and type or -d will put all files into a date sub folder(for the date they are moved) and then sub folders in that for the extension type.

* Downloads
  * 2022-05-31-Tuesday
    * jfr_files
    * txt_files

Organize by type and date

Organizing by type and date or -l will put all files into a type sub folder and then put the files further into sub folders for the date they are moved.

* Downloads
  * jfr_files
    * 2022-05-31-Tuesday
  * txt_files
    * 2022-05-31-Tuesday

Usage

Basic usage for the Downloads folder that will organize by type.

fo /Users/samuel/Downloads -t

Basic type organization with exclusion. Organize by type but exclude any files with the extension ".jfr".

The regex for excluding ".jfr" files = .+.jfr

fo /Users/samuel/Downloads -t -x=".+\.jfr"

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.