const fs = require('fs'); const path = require("path"); const pathToFile = path.join(__dirname, "sampleConfig.js") const pathToNewDestination = path.join(__dirname, "config", "config.js") try { fs.copyFileSync(pathToFile, pathToNewDestination) console.log("Successfully copied and moved config file!") } catch(err) { throw err }