JSPM

file-sorter

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20189F
  • License MIT

Sort files by YYYYMMDD

Package Exports

  • file-sorter
  • file-sorter/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (file-sorter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

File sorter

Sort files into YYYYMMDD.

Installation

$ npm install -g file-sorter

or

$ yarn global add file-sorter

Usage

By default sorting happens in the directory where the script was ran, but input & output directory can be set.

Use recursive flag when you also want to sort sub-directories.

If output directory is provided and recursive flag is set all the files will be moved to the output directory.

$ fs-sort --help

Example

$ fs-sort // sorts current dir
$ fs-sort --i="/path/to/dir/" --o="/path/to/output/dir" // sorts files in input dir to output dir
$ fs-sort --r // sorts current dir and all sub-dirs
$ fs-sort --i="/path/to/dir/" --o="/path/to/output/dir" --r // sorts files in input dir and sub-dirs to output dir

Warning

Using this script can be dangerous, so make sure you double check your parameters before runnings - there's no turning back.