var fs = require('fs'); /*cross device link fs.rename('c:\\err.LOG','d:\\err.LOG',function(err){ console.log(err.code); }); */ move('c:\\err.LOG','d:\\err.LOG',function(err){ if(err) throw err; }); function move(oldpath,newpath,callback){ fs.rename(o…