const fs = require('fs'); const readStream = fs.createReadStream('ws_1.txt'); const writeStream = fs.createWriteStream('ws_2.txt'); readStream.pipe(writeStream);