tornado-cli/scripts/copyFile.ts

15 lines
277 B
TypeScript
Raw Normal View History

2024-04-29 20:01:09 +03:00
import { argv } from 'process';
import { copyFile } from 'fs';
function copyFiles() {
const [, , inFile, outFile] = argv;
copyFile(inFile, outFile, function(err) {
if (err) {
throw err;
}
console.log(`Copied ${inFile} to ${outFile}`)
})
}
copyFiles()