Skip to content

Instantly share code, notes, and snippets.

@vivascau
Created October 8, 2014 16:05
Show Gist options
  • Save vivascau/dc1fdbffe9016eac380e to your computer and use it in GitHub Desktop.
Save vivascau/dc1fdbffe9016eac380e to your computer and use it in GitHub Desktop.
Use node.js to copy a file multiple times dynamically
/* global require, process, console */
var fs = require('fs');
for(var i=0; i<300; i++){
fs.createReadStream('wahteverFile.js')
.pipe(fs.createWriteStream('whateverFile'+i+'.js'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment