adhamu / nizr

A simple Node utility script to move or copy files from source directories into a target directory with a particular date format as its directory name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nizr

A tiny Node script for organising files into date folders

Requirements

  • Node v14.15.5
  • Yarn

Output Folder Format

2021/03 - March/
2021/02 - February/
2021/01 - January/

Config

The JSON config is an array of objects. Each object has the following properties

Name Description Type
inputs A list of input source directories. array
output The target directory for processed input sources. string
pattern (Optional) By default, no files are filtered but use a glob pattern to filter files. string
move (Optional) By default, files that are processed are copied. Set this to true to move the files. boolean
$ cp config.sample.json config.json

Running

$ yarn && yarn build
$ node dist/index.js

About

A simple Node utility script to move or copy files from source directories into a target directory with a particular date format as its directory name


Languages

Language:TypeScript 100.0%