Created
October 8, 2014 16:05
-
-
Save vivascau/dc1fdbffe9016eac380e to your computer and use it in GitHub Desktop.
Use node.js to copy a file multiple times dynamically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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