Skip to content

Instantly share code, notes, and snippets.

@ThenTech
Last active January 14, 2017 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThenTech/638ff2219b8786a83df863c574a8e58d to your computer and use it in GitHub Desktop.
Save ThenTech/638ff2219b8786a83df863c574a8e58d to your computer and use it in GitHub Desktop.
Copies files to Github dir
@echo off
REM Will copy files from this dir to its equivalent folder in GitHub dir
for %%* in (.) do set CurrDirName=%%~nx*
SET CPYDIR=%USERPROFILE%\Documents\GitHub\%CurrDirName%
SET DOXY=doxygen
SET UMLd=UML
title Copy from %CurrDirName% to GitHub\%CurrDirName%
IF NOT EXIST %CPYDIR% MD %CPYDIR%
echo Deleting old files...
DEL %CPYDIR%\*.h
DEL %CPYDIR%\*.hpp
DEL %CPYDIR%\*.cpp
DEL %CPYDIR%\*.pro
DEL %CPYDIR%\*.md
DEL %CPYDIR%\*.rc
echo.
echo Copying files...
COPY *.h %CPYDIR%\
COPY *.hpp %CPYDIR%\
COPY *.cpp %CPYDIR%\
COPY *.pro %CPYDIR%\
COPY *.md %CPYDIR%\
COPY *.rc %CPYDIR%\
DEL /Q %CPYDIR%\doxygen\
IF NOT EXIST %CPYDIR%\doxygen\ MD %CPYDIR%\doxygen\
COPY %DOXY%\ %CPYDIR%\doxygen\
DEL /Q %CPYDIR%\UML\
IF NOT EXIST %CPYDIR%\UML\ MD %CPYDIR%\UML\
COPY %UMLd%\ %CPYDIR%\UML\
DEL /Q %CPYDIR%\CPUInstructions\
IF NOT EXIST %CPYDIR%\CPUInstructions\ MD %CPYDIR%\CPUInstructions\
COPY CPUInstructions\ %CPYDIR%\CPUInstructions\
DEL /Q %CPYDIR%\CPUComponents\
IF NOT EXIST %CPYDIR%\CPUComponents\ MD %CPYDIR%\CPUComponents\
COPY CPUComponents\ %CPYDIR%\CPUComponents\
DEL /Q %CPYDIR%\CPUFactory\
IF NOT EXIST %CPYDIR%\CPUFactory\ MD %CPYDIR%\CPUFactory\
COPY CPUFactory\ %CPYDIR%\CPUFactory\
DEL /Q %CPYDIR%\Programs\
IF NOT EXIST %CPYDIR%\Programs\ MD %CPYDIR%\Programs\
COPY Programs\ %CPYDIR%\Programs\
DEL /Q %CPYDIR%\Resources\
IF NOT EXIST %CPYDIR%\Resources\ MD %CPYDIR%\Resources\
COPY Resources\ %CPYDIR%\Resources\
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment