Answers for "node change file name"

0

rename file using node javascript

var fs = require('fs');

fs.rename('mynewfile1.txt', 'myrenamedfile.txt', function (err) {
  
  if (err) throw err;
  console.log('File Renamed!');
});
Posted by: Guest on July-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language