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 42 43 44 45 46 47 48 49 50 51
|
@echo off
set "name=CheckIndex"
set "ver=1.3"
title %name% %ver%
set "r_val="
set "arg=-v -h"
set "args=-g -c -d -r"
if "%1"=="" (
goto:-h
)
for %%a in (%arg%) do (
if "%1"=="%%a" goto:%%a
)
if "%2"=="" (
goto:-h
)
for %%a in (%args%) do (
if "%1"=="%%a" if "%2"=="%~dpn2" goto:%%a
)
goto:-h
:-g
call:-t val1
echo %val1%
echo -g
goto:eof
:-t
if exist "%~dpn2" (
set "%~1=1"
) else (
set "%~1=0"
)
goto:eof
:-h
echo.
echo Usage: %0 [-v] [-h] ^| [-g] [-c] [-d] [-r] filename
echo.
echo -g - print the contents of directory into the specified file
echo -c - compare and create the differential file if needed
echo -d - display the contents of the specified file
echo -r - remove the specified file
echo -v - display version number and exit
echo -h - display this help and exit
goto:eof |
Partager