home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Misc / touchFiles.script < prev    next >
Encoding:
Text File  |  2001-06-19  |  720 b   |  39 lines

  1. !!script
  2. // Copyright ⌐ 1998 - Modelworks Software
  3. // @Created build 238 cm19981122
  4.  
  5. /**
  6. @Tool: touchFiles~sets the last modified date of all
  7. files in the selected directory and subdirectories
  8. to the current data and time. 
  9. @EndTool: 
  10. @Summary: touchFiles~sets the last modified date
  11. */
  12.  
  13. var gOutput = getOutput();
  14.  
  15. function DoCommand()
  16. {
  17.     var directory = chooseDirectory("Choose directory to touch");
  18.     
  19.     if (directory)
  20.     {
  21.         var files = getDirectoryFiles(directory, "*.*", true);
  22.         if (files)
  23.         {
  24.             var position = files.getHeadPosition();
  25.             while (position.valid)
  26.             {
  27.                 var file = files.getNext(position);
  28.                 if (file)
  29.                 {
  30.                     file.touch();
  31.                 }
  32.             }
  33.         }
  34.     }
  35. }
  36.  
  37. !!/script
  38.  
  39.