I\'m trying to move a file from one partition to another in a Node.js script. When I used fs.renameSync I received Error: EXDEV, Cross-device link.
fs.renameSync
Error: EXDEV, Cross-device link
to import the module and save it to your package.json file
npm install mv --save
then use it like so:
var mv = require('mv'); mv('source_file', 'destination_file', function (err) { if (err) { throw err; } console.log('file moved successfully'); });