home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff276.lzh / DateRequester / listsince < prev    next >
Text File  |  1989-11-09  |  934b  |  45 lines

  1. /* This simple macro solicits a test date from the user, then lists
  2.  * all files in the current directory which have been modified since
  3.  * that date. There is no error checking for invalid date format. 
  4.  */
  5.  
  6. options results
  7.  
  8.  
  9. portName = uniqueport()
  10.  
  11. Say "Unique port name =" portName
  12.  
  13. address value(portName)
  14.  
  15. 'setformat' "DOS";
  16. 'setprompt' "Select the test date (DD-MMM-YY):"
  17. 'request';
  18. 'getdate'
  19. testdate = result
  20. 'exit';
  21. say "The test date is" testdate
  22.  
  23. address command
  24. 'list' "since="testdate
  25.  
  26. exit
  27.  
  28. /* Create a unique rexx port name. */
  29. uniqueport:
  30. portNumber = 0
  31. do forever
  32.     testName = "mrdatereq" || portNumber
  33.     if show('ports', testName) = 0 then do
  34.         address command
  35.         'run' rxdatereq value(testName)
  36.         if rc ~= 0 then exit
  37.         do until show('ports', value(testName)) = 1
  38.             /* call Delay(10); */
  39.         end
  40.         return value(testName);
  41.     end
  42.     portNumber = portNumber + 1
  43. end
  44.  
  45.