An open API service indexing awesome lists of open source software.

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

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