Skip to content

Instantly share code, notes, and snippets.

@weaponsforge
Last active September 15, 2021 16:33
Show Gist options
  • Save weaponsforge/8756c3e2a58163cb0340e611e11a7aeb to your computer and use it in GitHub Desktop.
Save weaponsforge/8756c3e2a58163cb0340e611e11a7aeb to your computer and use it in GitHub Desktop.
Copy all files and directories recursively
::----------------------------------------------------------
:: Copy all directories and files recursively into a
:: specified directory. Overwrites existing files.
:: weaponsforge;20210827
::----------------------------------------------------------
@echo off
setlocal ENABLEDELAYEDEXPANSION
set replace=kyp
echo Enter a directory [%replace%]
set /p replace="or press enter to proceed:"
set curr_path="%cd%"
set curr_path=%curr_path:local_kyp=!replace!%
xcopy /s /A . %curr_path% /y /i
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment