0

Hi I'm trying to copy a folder to a new folder (recursively), I've found a working example however it only copies one child directory within the parent, the last directory to be exact.

(this is the copyDir func I copied: https://stackoverflow.com/a/26038979/10949890)

I have about 7+ folders within the parent I want to copy them all within a new directory.

Perhaps I need to change something on my input?

<input
   type="file"
   id="file-picker"
   // eslint-disable-next-line @typescript-eslint/ban-ts-comment
   // @ts-ignore
   webkitdirectory="true"
   directory="true"
   onChange={handleSelectedFiles}
/>
AbrahamDN
  • 39
  • 3
  • I'm confused. The `copyDir()` code you reference is back-end code (runs on a server). The HTML you show here is front-end HTML (displays in the browser). You don't show any means of connecting them in anyway. Plus a server can't copy files in the client anyway except in the rare case where there's only one client and it's running on the same host as the server. – jfriend00 Jan 10 '23 at 21:33

0 Answers0