home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 276.GIFV.SLR < prev    next >
Text File  |  1993-02-17  |  1KB  |  41 lines

  1. ;
  2. ; GIFV.SLR
  3. ; This script shows how to use the IF-LAST-FILE, File-Delete, File-Copy,
  4. ; File-Rename, File-Move, File-Error(System Variable), and the power use of
  5. ; the Change-Path command.
  6. ;
  7. ; The purpose of this script is the show how to use a variety of commands in
  8. ; a script that actually does something pretty useful(AMAZING)!. This script
  9. ; will go to a directory of choice(specified at run time) and will
  10. ; automatically create 3 subdirectories (GIF, BMP, and OTHER). It will then
  11. ; process the directory and move all of the .GIF files into the GIF
  12. ; subdirectory, all of the .BMP files into the BMP subdirectory and the rest
  13. ; of the files into a subdirectory called OTHER.
  14. ;
  15. ; NOTE The format for FILE-COPY is the same as FILE-MOVE. FILE-DELETE and
  16. ;      FILE-RENAME are documented in the manual.
  17. ;
  18.         change-path %1
  19.         Sub-Create gif
  20.         Sub-Create bmp
  21.         Sub-Create other
  22. :loop
  23.         if-last-file  :exit
  24.         ifbmp         :movetobmp
  25.         ifgif         :movetogif
  26.         file-move other :move-err
  27.         goto          :donext
  28. :move-err
  29.         echo     Error in moving file
  30.         goto          :donext
  31. :movetobmp
  32.         file-move bmp :move-err
  33.         goto          :donext
  34. :movetogif
  35.         file-move gif :move-err
  36.         goto          :donext
  37. :donext
  38.         skipnext      :exit
  39.         goto :loop
  40. :exit
  41.