How to copy text (.txt) files in a folder and paste it to a different folder in Angular?
const fs = require('fs');// File destination.txt will be created or overwritten by default.fs.copyFile('source.txt', 'destination.txt', (err) => { if (err) throw err; console.log('source.txt was copied to destination.txt');});
const fs = require('fs');
// File destination.txt will be created or overwritten by default.
fs.copyFile('source.txt', 'destination.txt', (err) => {
if (err) throw err;
console.log('source.txt was copied to destination.txt');
});