-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargs-check1.bat
More file actions
41 lines (33 loc) · 730 Bytes
/
Copy pathargs-check1.bat
File metadata and controls
41 lines (33 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
:main
if "%1"=="" goto Usage
if "%1"=="compress" goto compress
if "%1"=="uncompress" goto uncompress
rem Unknown command passed, display the usage!
echo Unknown command '%1'!!
goto usage
:Usage
ECHO %0 compress^|uncompress archive.zip
goto end
:compress
if "%2"=="" (
echo No archive name was passed!
goto Usage
)
echo Compressing current folder into archive '%2'
REM invoke the compression utility
goto end
:uncompress
if "%2"=="" goto Usage
if "%2"=="" (
echo No archive name was passed!
goto Usage
)
if not exist %2 (
ECHO The archive '%2' is not found!
goto end
)
echo Uncompressing the archive '%2' into the current folder
REM invoke the decompression utility
goto end
:end