Move files in Node.js
var fs = require('fs'); var is = fs.createReadStream('source_file'); var os = fs.createWriteStream('destination_file'); is.pipe(os); is.on('end',function() { fs.unlinkSync('source_file'); });