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 >
Text File  |  1990-03-03  |  3KB  |  74 lines

  1. echo off
  2. Rem (c) Daniel MONTARON 1990.
  3. Rem DELS et ? necessitent la presence de KEY.COM
  4. Rem VERSION DOS 2.0
  5. if %1-==ERRORL- goto ER
  6. if %1-==errorl- goto ER
  7. if %2'==' if exist %0.nsi goto V
  8. if %2'==' goto U
  9. for %%x in (ADPATH,adpath,dels,DELS,$,Z,z) do if %1'==%%x' goto %1
  10. if %2'==?' for %%x in (%3 %4 %5 %6 %7 %8 %9) do command /c%0 $ %1 %%x
  11. if %3'==$' for %%x in (%4 %5 %6 %7 %8 %9) do command /c%0 z %%x %1 %2
  12. if %4'==$' for %%x in (%5 %6 %7 %8 %9) do command /c%0 z %%x %1 %2 %3
  13. if %5'==$' for %%x in (%6 %7 %8 %9) do command /c%0 z %%x %1 %2 %3 %4
  14. if %6'==$' for %%x in (%7 %8 %9) do command /c%0 z %%x %1 %2 %3 %4 %5
  15. set $1=%2
  16. set $=%1
  17. if %2'==/' set $1=
  18. if %2'==/' goto £
  19. if not %3'==/' goto w
  20. shift
  21. shift
  22. if %2'==' goto w
  23. %$% %2 %$1%
  24. goto £
  25. :ADPATH
  26. PATH %PATH%;%2
  27. goto w
  28. :DELS
  29. %0 del ? %2 %3 %4 %5 %6 %7 %8 %9
  30. :$
  31. echo Confirme %2 %3 (o/N) ?
  32. key
  33. if errorlevel=79 if not errorlevel=80 %2 %3
  34. if errorlevel=111 if not errorlevel=112 %2 %3
  35. if %2'==del' if exist %3 echo %3 non effacé.
  36. if %2'==del' if not exist %3 echo %3 effacé.
  37. goto w
  38. :ER
  39. for %%x in(0 1 2) do if errorlevel=%%x00 set $1=%%x
  40. for %%x in(0 1 2 3 4 5 6 7 8 9) do if errorlevel=%$1%%%x0 set $=%$1%%%x
  41. for %%x in(0 1 2 3 4 5 6 7 8 9) do if errorlevel=%$%%%x set $1=%$%%%x
  42. echo Errorlevel = %$1%
  43. goto w
  44. :Z
  45. for %%x in (%3 %4 %5 %6 %7 %8 %9) do %%x %2
  46. goto w
  47. :V
  48. type %0.nsi |more
  49. :U
  50. echo (c) Daniel MONTARON 1990.
  51. Echo Usages:
  52. echo %0 ADPATH chemin_supplementaire  (Ajoute un path supplémentaire)
  53. echo %0 DELS fic1 fic2 fic3 ... fic8  (Effacement avec confirmation)
  54. echo %0 ERRORL                        (Affiche errorlevel)
  55. echo %0 commande / fic1 fic2 fic3 ... (Commande multi fichiers)
  56. echo %0 commande ? fic1 fic2 fic3 ... fic7 
  57. echo      (Idem. Avec expansion des jokers et demande de confirmation)
  58. echo %0 comm. parm / fic1 fic2 fic3...(Avec parametre/destination)
  59. echo %0 comm comm2... $ fic1 fic2 ... (Multi commandes et fichiers)
  60. echo Exemples:
  61. echo %0 DEL / *.bak *.$$$... ==DEL *.bak, DEL *.$$$,...
  62. echo %0 DEL ? *.tmp    (idem avec demande de confirmation par fichier)
  63. echo %0 DIR /w / dos util... ==DIR /w dos, DIR /w util,...
  64. echo %0 COPY / a b c ...     ==COPY a, COPY b, COPY c, ...
  65. echo %0 COPY a: / x y z...   ==COPY x a:, COPY y a:, COPY z a:,...
  66. echo %0 REN *.old / x y z... ==REN x *.old, REN y *.old, ...
  67. echo %0 DIR DEL RD $ zone z2 ==DIR zone, DEL zone, RD zone,...
  68. echo %0 COPY DEL $ a:babas...==COPY a:babas, DEL a:babas,...
  69. echo Jokers *? permis et expansés.
  70. :w
  71. set $=
  72. set $1=
  73.