home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / nickpm.zip / NICKDEMO.NSC < prev    next >
Text File  |  1993-02-10  |  2KB  |  72 lines

  1. // A simple demo showing a script for automated
  2. // backing up the files from one directory to another
  3.  
  4. // The environment variables NICKSOURCE and NICKTARGET
  5. // have to be set as full path names, which may be located on
  6. // a LAN server with the restriction that the drive is coded as
  7. // a "real" drive eg: L:\SERVERDIR\SOURCE and NOT as a computer
  8. // name such as: \\SERVER\SERVERDIR\SOURCE
  9.  
  10. // The demo can be started from the command line by:
  11.  
  12. // NICKPMU NICKDEMO
  13. //    and press START after the PM window is made visible
  14. //
  15. // or:
  16. // NICKPMU /start NICKDEMO
  17.  
  18. // *******************************************************
  19. // SCRIPT statements:
  20. // *******************************************************
  21.  
  22. title "Directory backup"
  23.  
  24. loop.mode yes  // Monitor will run in loop mode
  25.  
  26. step.mode yes  // Monitor will start in step mode
  27.                // Step mode can be reset by pressing the
  28.                // 'Step mode' button which turns fron darkred to cyan
  29.  
  30. wait.mode yes  // Monitor will enter a countdown wait state
  31.                // if no activities have been triggered in
  32.                // a pass before entering the next pass
  33.  
  34. wait.time 900  // If the wait state is entered wait time will be 15 minutes
  35.  
  36. // Prologue
  37.  
  38. prologue
  39.  
  40.   message Thank you for giving your attention to NICKPM(r) from OMNISYS INFORMATION TECHNOLOGY  
  41.  
  42. // Object 1:
  43.  
  44. object.dir <e:NICKSOURCE>  // Switch to directory where
  45.                            // the sources are located
  46.  
  47. // Object 2:
  48.  
  49. file *.*                  // For all files in that directory...
  50.  
  51.  // Dependencies: 
  52.  
  53.  archive yes              // Which have their archive bit set: 
  54.  
  55.   // Actions:
  56.  
  57.   run copy /b <name> <e:NICKTARGET>  // Copy file to target
  58.    notify yes                           // Notify error to user
  59.    error  abort                         // Terminate if error 
  60.   run attrib -a <name>               // Reset archive bit
  61.    error  user                          // Let user decide on error
  62.  
  63. // note: Object 1 and 2 could be combined in the single:
  64. //       file <e:NICKSOURCE>\*.*
  65.  
  66.  
  67. // epilogue
  68.  
  69. epilogue
  70.  
  71.   message Thank you for running NICKPMU
  72.