Skip to content

Instantly share code, notes, and snippets.

@heiswayi
Last active August 2, 2018 16:33
Show Gist options
  • Save heiswayi/b4fc1b7cfac002ac2ce09d8bbf3e4145 to your computer and use it in GitHub Desktop.
Save heiswayi/b4fc1b7cfac002ac2ce09d8bbf3e4145 to your computer and use it in GitHub Desktop.
Batch scripting to copy compiled Jekyll source into GitHub repo, but first delete previous folders and files
@echo off
set from="G:\GIT-REPOS\MyBitBucket\heiswayi.nrird.com\_site"
set to="G:\GIT-REPOS\MyGitHub\heiswayi.github.io"
for %%i in (%to%\*) do (
del /S /Q %%i
)
for /d %%i in (%to%\*) do (
if /i "%%i" NEQ ".git" rmdir /S /Q %%i
)
robocopy %from% %to% /E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment