Skip to content

Instantly share code, notes, and snippets.

@Darker
Created October 4, 2016 23: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 Darker/c88d4e1ff2bc1c49023990ae9ecdc033 to your computer and use it in GitHub Desktop.
Save Darker/c88d4e1ff2bc1c49023990ae9ecdc033 to your computer and use it in GitHub Desktop.
Prepare CTU (CVUT) programming homework assignment for upload
@echo off
set FILETOZIP=%1
echo Selected file: %FILETOZIP%
set TEMPDIR=TMP
echo Creating temporary file directory .\%TEMPDIR%
mkdir %TEMPDIR%
copy %FILETOZIP% %TEMPDIR%\main.c
copy *.h %TEMPDIR%
cd %TEMPDIR%
rem echo Starting 7zip with arguments: %ProgramFiles%\7-Zip\7z a -y -tzip main.zip main.c
7z a -y -tzip main.zip *
cd ..
xcopy %TEMPDIR%\main.zip . /Y /I
echo Removing the temporary directory
rmdir /S /Q %TEMPDIR%
IF %2=="" (
pause
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment