home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / pastrans.zip / SAMPLES / FILECOPY.PAS < prev    next >
Pascal/Delphi Source File  |  1990-06-15  |  718b  |  25 lines

  1. (*$c+*)
  2. PROGRAM File_copy(prd, prr);
  3. { prd AND prr must match command line file specifiers
  4.   with "prr" and "prd" in their path names, either as
  5.   suffixes (.prr, .prd), prefixes, or entire names. If
  6.   you plan to copy long files with this program, or you
  7.   do not want to view the copied file as it is copied,
  8.   put comment markers around the `WRITE(current);' and
  9.   `WRITELN;' statements. }
  10. VAR    current : char;
  11.     prr, prd : text;
  12. BEGIN
  13. RESET(prd); REWRITE(prr);
  14.  WHILE NOT EOF(prd) DO
  15.   BEGIN
  16.    WHILE NOT EOLN(prd) DO
  17.     BEGIN
  18.      READ(prd, current);
  19.      WRITE(current);
  20.      WRITE(prr, current)
  21.     END; {eoln loop}
  22.    READLN(prd); WRITELN; WRITELN(prr)
  23.   END {eof loop}
  24. END. {File_copy}
  25.