1.1.9 • Published 4 years ago

@fc.sh/fs-tools v1.1.9

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@fc.sh/fs-tools

This tool is for operating files.

Install

install globally

  # use npm
  npm install -g @fc.sh/fs-tools

  # use yarn
  yarn global add @fc.sh/fs-tools

Usage

rename files

  @fc.sh/fs-tools rename <sourcePath> <targetPath> -e <ignoreFilePath> -dry

sourcePath accepts glob pattern targetPath accepts both relative and absolute path, and also accepts two special characters:

  • %name: replace with the source file name without extension (e.g. %name.txt -> hello.txt)
  • %ext: replace with the source file extension (e.g. hello.%ext -> hello.txt)

examples

  @fc.sh/fs-tools rename './**/*.htm' '*.html' -e '**/node_modules/**'
  @fc.sh/fs-tools rename './**/*.htm' '%name.html' -e '**/node_modules/**' # rename all .htm files to .html

  @fc.sh/fs-tools rename './**/*.html' 'hello%ext' -e '**/node_modules/**' # rename all .html files to hello.html

  @fc.sh/fs-tools rename './**/*.htm' '%name.html' -e '**/node_modules/**,**/index.html' -dry # dry run, multiple ignores

Command line options

shorthandlong formdescription
-dry--dry-runrun without any changes.
-e--excludeFiles that will be ignored.
1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago