<commit_before># robocopy

[![npm version](http://img.shields.io/npm/v/robocopy.svg)](https://npmjs.org/package/robocopy) [![build status](http://img.shields.io/travis/mikeobrien/node-robocopy.svg)](https://travis-ci.org/mikeobrien/node-robocopy)

Node wrapper for [Robocopy](http://technet.microsoft.com/en-us/library/cc733145.aspx).

## Install

```bash
$ npm install robocopy --save
```

## Usage

The options below mirror those of the robocopy command itself, so check 
out the [robocopy documentation](http://technet.microsoft.com/en-us/library/cc733145.aspx) 
for more details. The first parameter is the options:

```js
var robocopy = require('robocopy');

robocopy({ ... });
```

Robocopy returns a [promise](https://github.com/kriskowal/q). Success returns `stdout` as an array:

```js
robocopy({ ... })
    .done(function(stdout) {
        console.log(stdout);
    });
```

Failure returns and error object that indicates the return code and both `stdout` and `stderr` as an array:

```js
robocopy({ ... })
    .fail(function(error) {
        console.log(error.code);
        console.log(error.stdout);
        console.log(error.stderr);
    });
```

```js
robocopy({

    // Specifies the path to the source directory.
    source: '',

    // Specifies the path to the destination directory.
    destination: '',

    // Specifies the file or files to be copied. You can use wildcard characters (* or ?), if
    // you want. If the File parameter is not specified, *.* is used as the default value.
    files: ['*.html', '*.js', '/bin/*.*'],<commit_msg>Updated README.<commit_after># robocopy

[![npm version](http://img.shields.io/npm/v/robocopy.svg)](https://npmjs.org/package/robocopy) [![build status](http://img.shields.io/travis/mikeobrien/node-robocopy.svg)](https://travis-ci.org/mikeobrien/node-robocopy)

Node wrapper for [Robocopy](http://technet.microsoft.com/en-us/library/cc733145.aspx).

## Install

```bash
$ npm install robocopy --save
```

## Usage

 The first parameter is the options:

```js
var robocopy = require('robocopy');

robocopy({ ... });
```

Robocopy returns a [promise](https://github.com/kriskowal/q). Success returns `stdout` as an array:

```js
robocopy({ ... })
    .done(function(stdout) {
        console.log(stdout);
    });
```

Failure returns and error object that indicates the return code and both `stdout` and `stderr` as an array:

```js
robocopy({ ... })
    .fail(function(error) {
        console.log(error.code);
        console.log(error.stdout);
        console.log(error.stderr);
    });
```

The options below mirror those of the robocopy command itself, so check 
out the [robocopy documentation](http://technet.microsoft.com/en-us/library/cc733145.aspx) 
for more details.

```js
robocopy({

    // Specifies the path to the source directory.
    source: '',

    // Specifies the path to the destination directory.
    destination: '',

    // Specifies the file or files to be copied. You can use wildcard characters (* or ?), if
    // you want. If the File parameter is not specified, *.* is used as the default value.
    files: ['*.html', '*.js', '/bin/*.*'],
{'fraction_non_alphanumeric': 0.16379310344827586, 'fraction_numerical': 0.007662835249042145, 'mean_word_length': 3.4314002828854315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2029585', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1003, 'n_words': 274}