Created
October 4, 2016 23:29
-
-
Save Darker/c88d4e1ff2bc1c49023990ae9ecdc033 to your computer and use it in GitHub Desktop.
Prepare CTU (CVUT) programming homework assignment for upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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