Pranam Bhat
How to copy text (.txt) files in a folder and paste it to a different folder in Angular?

How to copy text (.txt) files in a folder and paste it to a different folder in Angular?

By Pranam Bhat in Angular on Jul 30 2021
  • Ganesan C
    Aug, 2021 17

    1. const fs = require('fs');
    2. // File destination.txt will be created or overwritten by default.
    3. fs.copyFile('source.txt', 'destination.txt', (err) => {
    4. if (err) throw err;
    5. console.log('source.txt was copied to destination.txt');
    6. });

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS