home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / dsharp10.zip / DO.BAT < prev    next >
DOS Batch File  |  1993-01-24  |  646b  |  24 lines

  1. @ECHO OFF
  2. :::NOTE: The "#" and "$" symbols may not work with 4DOS or NDOS
  3. :::      Change these to alphanumeric characters (X, 1, etc) if you wish
  4. IF "%1"=="" ECHO DO command [arg1 arg2 arg3] FOR filespec1 [filespec2 filespec3...]
  5. IF "%1"=="" GOTO END
  6. SET #=$
  7. SET $=%1
  8. SHIFT
  9. :LOOP1 to check format and get args
  10.     IF "%1"=="" DO
  11.     FOR %%A IN (for FOR) DO IF "%1"=="%%A" GOTO LOOP2
  12.     SET #=%#%$
  13.     SET %#%=%1
  14.     SHIFT
  15.     GOTO LOOP1
  16. :LOOP2 for all filespecs
  17.     IF "%2"=="" GOTO END
  18.     ECHO %$% %2 %$$% %$$$% %$$$$%
  19.     %$% %2 %$$% %$$$% %$$$$%
  20.     SHIFT
  21.     GOTO LOOP2
  22. :END
  23. FOR %%X IN (# $ $$ $$$ $$$$) DO SET %%X=
  24.