Answers for "copy file javascript"

0

copy file javascript

//copyfile.js
const fs = require('fs');

// destination will be created or overwritten by default.
fs.copyFile('C:\folderA\myfile.txt', 'C:\folderB\myfile.txt', (err) => {
  if (err) throw err;
  console.log('File was copied to destination');
});
Posted by: Guest on March-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language