home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
b
/
bestba.zip
/
DM!20
< prev
next >
Wrap
Text File
|
1990-03-03
|
3KB
|
74 lines
echo off
Rem (c) Daniel MONTARON 1990.
Rem DELS et ? necessitent la presence de KEY.COM
Rem VERSION DOS 2.0
if %1-==ERRORL- goto ER
if %1-==errorl- goto ER
if %2'==' if exist %0.nsi goto V
if %2'==' goto U
for %%x in (ADPATH,adpath,dels,DELS,$,Z,z) do if %1'==%%x' goto %1
if %2'==?' for %%x in (%3 %4 %5 %6 %7 %8 %9) do command /c%0 $ %1 %%x
if %3'==$' for %%x in (%4 %5 %6 %7 %8 %9) do command /c%0 z %%x %1 %2
if %4'==$' for %%x in (%5 %6 %7 %8 %9) do command /c%0 z %%x %1 %2 %3
if %5'==$' for %%x in (%6 %7 %8 %9) do command /c%0 z %%x %1 %2 %3 %4
if %6'==$' for %%x in (%7 %8 %9) do command /c%0 z %%x %1 %2 %3 %4 %5
set $1=%2
set $=%1
if %2'==/' set $1=
if %2'==/' goto £
if not %3'==/' goto w
shift
:£
shift
if %2'==' goto w
%$% %2 %$1%
goto £
:ADPATH
PATH %PATH%;%2
goto w
:DELS
%0 del ? %2 %3 %4 %5 %6 %7 %8 %9
:$
echo Confirme %2 %3 (o/N) ?
key
if errorlevel=79 if not errorlevel=80 %2 %3
if errorlevel=111 if not errorlevel=112 %2 %3
if %2'==del' if exist %3 echo %3 non effacé.
if %2'==del' if not exist %3 echo %3 effacé.
goto w
:ER
for %%x in(0 1 2) do if errorlevel=%%x00 set $1=%%x
for %%x in(0 1 2 3 4 5 6 7 8 9) do if errorlevel=%$1%%%x0 set $=%$1%%%x
for %%x in(0 1 2 3 4 5 6 7 8 9) do if errorlevel=%$%%%x set $1=%$%%%x
echo Errorlevel = %$1%
goto w
:Z
for %%x in (%3 %4 %5 %6 %7 %8 %9) do %%x %2
goto w
:V
type %0.nsi |more
:U
echo (c) Daniel MONTARON 1990.
Echo Usages:
echo %0 ADPATH chemin_supplementaire (Ajoute un path supplémentaire)
echo %0 DELS fic1 fic2 fic3 ... fic8 (Effacement avec confirmation)
echo %0 ERRORL (Affiche errorlevel)
echo %0 commande / fic1 fic2 fic3 ... (Commande multi fichiers)
echo %0 commande ? fic1 fic2 fic3 ... fic7
echo (Idem. Avec expansion des jokers et demande de confirmation)
echo %0 comm. parm / fic1 fic2 fic3...(Avec parametre/destination)
echo %0 comm comm2... $ fic1 fic2 ... (Multi commandes et fichiers)
echo Exemples:
echo %0 DEL / *.bak *.$$$... ==DEL *.bak, DEL *.$$$,...
echo %0 DEL ? *.tmp (idem avec demande de confirmation par fichier)
echo %0 DIR /w / dos util... ==DIR /w dos, DIR /w util,...
echo %0 COPY / a b c ... ==COPY a, COPY b, COPY c, ...
echo %0 COPY a: / x y z... ==COPY x a:, COPY y a:, COPY z a:,...
echo %0 REN *.old / x y z... ==REN x *.old, REN y *.old, ...
echo %0 DIR DEL RD $ zone z2 ==DIR zone, DEL zone, RD zone,...
echo %0 COPY DEL $ a:babas...==COPY a:babas, DEL a:babas,...
echo Jokers *? permis et expansés.
:w
set $=
set $1=