home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP NET Rehberi Eylül 1998.iso / ftp / gbxwind2p6 / DATA1.CAB / QueDemo_Executable_Files / QUEDEMO.BAT < prev    next >
Encoding:
DOS Batch File  |  1998-05-13  |  2.4 KB  |  76 lines

  1. REM Niwot Networks copyright 1997 (originally quedemo.bat)
  2. REM You may use and modify with the only restriction being
  3. REM that you must preserve these first three lines.
  4. @ECHO OFF
  5. REM This Quedemo batch file demonstrates
  6. REM NMOVE ver 1.4 to handle a priority queue
  7. REM The customer dumps .TIF and .ZIP files into C:\QUEUE
  8. REM The customer desires all .TIF files to go first,
  9. REM and .ZIP files to go if there are no TIF files waiting.
  10. REM When used with DFT, CDFT is launched with /w0x60 /MLFILES.LST
  11. REM   where FILES.LST is just: 
  12. REM     Send c:\hotfold\*.*
  13. REM     END
  14. REM When used with GBXWIN, GBXWIN is set to autosend modified
  15. REM    from c:\hotfold
  16. REM This batch file moves
  17. REM  (1st) all .TIF files from c:\queue to C:\hotfold
  18. REM  (2nd) .ZIP files if c:\hotfold is getting empty
  19. REM GBXWIN or CDFT sends the modified files and clears the archive bit
  20. REM The batch file also scans c:\hotfold for files whose
  21. REM archive bit has been cleared and moves them to C:\DONE.
  22.  
  23. :AGAIN
  24. wait 2
  25. REM just for testing, next lines re-fill c:\queue
  26.  
  27. if exist c:\queue\*.tif  goto GWAN
  28. if exist c:\queue\*.zip  goto GWAN
  29.  
  30. goto QEMPTY
  31.  
  32. :GWAN
  33. REM see if there are any files in c:\hotfold with archive bit cleared 
  34. nmove /n /a c:\hotfold\*.*
  35. if errorlevel 1 goto MOVARCH
  36.  
  37. REM see if there are any TIF files waiting to go
  38. if exist c:\queue\*.tif  goto TIFIN
  39.  
  40. REM see if there are any zip files waiting to go
  41. if exist c:\queue\*.zip  goto ZIPIN
  42.  
  43. goto AGAIN
  44.  
  45. :MOVARCH
  46. REM Got here because there is one( or more) archived file in c:\hotfold
  47. REM and we want to move it(them) to c:\done
  48. nmove /a c:\hotfold\*.* c:\done >> nmove.log
  49. goto again
  50.  
  51. :TIFIN
  52. REM Got here because there is one( or more) TIF file in c:\queue
  53. REM and we want to move it(them) to c:\hotfold
  54. nmove c:\queue\*.tif c:\hotfold  >> nmove.log
  55. goto again
  56.  
  57. :ZIPIN
  58. REM Got here because there is one( or more) ZIP file in c:\queue
  59. REM and we want to see if we should move it into c:\hotfold
  60. REM we don't want to move it if there are two or more files
  61. REM in c:\hotfold with their archive bits on (modified)
  62. nmove /M /N c:\hotfold\*.*
  63. if errorlevel 2 goto AGAIN
  64.  
  65. REM Got here because there are zip files to transfer and there 
  66. REM is no more than one modified file in c:\hotfold
  67. nmove /o c:\queue\*.ZIP c:\hotfold >> nmove.log
  68. goto AGAIN
  69.  
  70. :QEMPTY
  71. REM time < enter >>nsmove.log
  72. attrib +a c:\done\*.*
  73. nmove c:\done\*.* c:\queue >> nmove.log
  74. goto again
  75.  
  76.