Skip to content

Instantly share code, notes, and snippets.

@collin
Last active December 25, 2015 11:39
Show Gist options
  • Save collin/6970154 to your computer and use it in GitHub Desktop.
Save collin/6970154 to your computer and use it in GitHub Desktop.
var fs, i, rs, ws, _i;
fs = require('fs');
for (i = _i = 1; _i <= 100; i = ++_i) {
// file-to-copy is a 4MB zip file
fs.createReadStream("./file-to-copy").pipe(
fs.createWriteStream("./copies/copy-" + i + ".zip")
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment