https://github.com/busterc/mvy
:file_folder: mvy = mkdirp + mv // a cli for moving to a new directory
https://github.com/busterc/mvy
directories files filesystem glob globbing mkdir move
Last synced: about 2 months ago
JSON representation
:file_folder: mvy = mkdirp + mv // a cli for moving to a new directory
- Host: GitHub
- URL: https://github.com/busterc/mvy
- Owner: busterc
- License: isc
- Created: 2017-06-07T20:58:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T13:02:54.000Z (over 4 years ago)
- Last Synced: 2025-04-23T16:24:47.861Z (about 1 year ago)
- Topics: directories, files, filesystem, glob, globbing, mkdir, move
- Language: JavaScript
- Size: 21.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mvy [![NPM version][npm-image]][npm-url]
> mvy = mkdirp + mv // a cli for moving to a new directory
## Installation
```sh
$ npm install mvy --global
```
## Usage
```sh
$ mvy ...
Options
--force, -f Overwrite existing target files
```
```sh
# MAJOR KEY ALERT:
#
# 1. When the has a trailing slash,
# the will be placed inside the
#
# 2. When both the and have trailing slashes,
# the *ENTIRE* path will be appended to the path
# and the files will be placed inside the appended path
#
# 3. Supports multiple sources and globs
# move a file into a new directory
$ mvy somewhere/exists/a.file yet/to/be/created/directory/
# => yet/to/be/created/directory/a.file
# move multiple files into a new directory
$ mvy somewhere/exists/*.file yet/to/be/created/directory/
# => yet/to/be/created/directory/a.file
# => yet/to/be/created/directory/b.file
# move a file into a new directory and rename the file
$ mvy somewhere/exists/a.file yet/to/be/created/directory/b.file
# => yet/to/be/created/directory/b.file
# move a directory into a new directory
$ mvy somewhere/exists yet/to/be/created/directory/
# => yet/to/be/created/directory/exists/
# => yet/to/be/created/directory/exists/a.file
# move a directory into a new directory and rename the directory
$ mvy somewhere/exists yet/to/be/created/directory
# => yet/to/be/created/directory/
# => yet/to/be/created/directory/a.file
# move a directory into a new directory *APPENDING THE SOURCE PATH*
$ mvy somewhere/exists/ yet/to/be/created/directory/
# => yet/to/be/created/directory/somewhere/exists/
# => yet/to/be/created/directory/somewhere/exists/a.file
```
## License
ISC © [Buster Collings](https://about.me/buster)
[npm-image]: https://badge.fury.io/js/mvy.svg
[npm-url]: https://npmjs.org/package/mvy