Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fs move file

var fs = require('fs')

var oldPath = 'old/path/file.txt'
var newPath = 'new/path/file.txt'

fs.rename(oldPath, newPath, function (err) {
  if (err) throw err
  console.log('Successfully renamed - AKA moved!')
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fs #move #file
ADD COMMENT
Topic
Name
1+6 =