Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rename file in js

var fs = require('fs');
 
fs.rename('sample_old.txt', 'sample_new.txt', function (err) {
  if (err) throw err;
  console.log('File Renamed.');
});
 
PREVIOUS NEXT
Tagged: #rename #file #js
ADD COMMENT
Topic
Name
3+1 =