// filecopy.js const fs = require('fs'); (async () => { fs.copyFile('origin.txt', 'copied.txt', err => { if(err) throw err; console.log('origin.txt파일이 copied.txt파일로 복사되었습니다.'); }); })(); fs.copyFile("원본파일", "복사될파일", callback함수) 만약 아래와 같이 origin.txt파일이 실행하려는 파일 filecopy.js와 같은 폴더에 존재한다면 아래 명령어를 실행하면 console.log에서 적어둔 message가 출력되면서 아래와 같이 copied.txt파일이 생성됨을 확인할 수 있습니다. callback은 굳이 필요 없는 경우 생략해도 ..