Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including file-keeper with all npm packages installed. Try it out:

var fileKeeper = require("file-keeper")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

file-keeper v1.11.3

Watch a file and copy at every time of saving a file.

file-keeper is Watch And Copy files

Watch a file and copy at every time of saving a file.

Every time the file is saved, it is copied to the specified directory and the file name has datetime or serial number.


require Node.js

  1. install
$ npm install -g file-keeper
  1. develop

Move to the directory containing the file you want to copy.

Example: /home/xxx/xxx.psd

$ cd /home/xxx

# start watch
$ file-keeper
## Note: 'dist/' directory is created in '/home/xxx/'

# end watch
## `Ctrl + C`

Command Options

Consecutive Number

Output files in consecutive number.

$ file-keeper -n
$ file-keeper --number
$ file-keeper --mode=number

File Type

You can specify the target file. If you do not add an option, watch default ".psd", ".ai", ".xls", ".xlsx", ".doc", ".docx".

# Watch only .jpg files
$ file-keeper --exts=.jpg

# Watch .jpg files & js files
$ file-keeper --exts=.jpg.js

Working Directory

Specify a working directory.

# Watch ./example_folder
$ file-keeper --wdir=example_folder

Distribution Directory

Specify a distribution directory.

# Watch ./example_folder
$ file-keeper --ddir=example_folder

Clean Distribution Directory before Start

$ file-keeper --clean
$ file-keeper -c

Recursively watch files in lower directories

$ file-keeper --recursive
$ file-keeper -r

For file updates only

$ file-keeper --onlyupdate
$ file-keeper --noadd
$ file-keeper -u

Save log file

$ file-keeper --save-log
$ file-keeper --save-logs
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free