home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / jext-install.exe / {app} / bin / scripts / CopyFile.jext-script next >
Encoding:
Text File  |  2001-06-19  |  817 b   |  33 lines

  1. #######################################
  2. # FILE COPIER                         #
  3. #######################################
  4. # (C)2000 Romain Guy                  #
  5. # Dawn demonstration                  #
  6. #######################################
  7.  
  8. "File to copy: " input
  9. "Destination: " input
  10.  
  11. 0 copyFileLinesCount ->
  12. copyFileDestination ->
  13.  
  14. try
  15.   "DAWN.IO.COPYFILE" openForInput
  16.   while "DAWN.IO.COPYFILE" isFileAvailable repeat
  17.     "DAWN.IO.COPYFILE" readLine
  18.     copyFileLinesCount ++
  19.   wend
  20.  
  21.   1 copyFileLinesCount rcl 1 - i for
  22.     swap lineSeparator concat swap concat
  23.   next
  24.  
  25.   copyFileDestination rcl "DAWN.IO.COPYFILE" openForOutput
  26.   "DAWN.IO.COPYFILE" writeLine
  27.   "DAWN.IO.COPYFILE" closeFile
  28. catch "An error occured during copy !" msgBox err
  29.  
  30. "Copy done." msgBox
  31.  
  32. # End of script
  33.