You want a copy of a project folder: every file, every subfolder, the empty logs folder too. COPY only handles files in one folder, so it is the wrong tool. XCOPY copies a whole tree from a normal Command Prompt, with no extra install.
Here is the one line most people need, then the flags that make it safe.
The command
xcopy C : \ Projects \ WebApp D : \ Backup \ WebApp / e / i / h / y
Enter fullscreen mode
Exit fullscreen mode
What each flag does:
Flag What it does
/e Copies all subfolders, including empty ones
/i If the destination doesn't exist, treat it as a folder (no prompt)
/h Also copies hidden and system files
/y Overwrites existing files without asking
The result: D:\Backup\WebApp is created and gets the full tree from C:\Projects\WebApp .
/s vs /e: where empty folders go missing
/s copies subfolders unless they are empty .…