home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OL.LZH
/
PROCS.LZH
/
FCOPY.ICN
< prev
next >
Wrap
Text File
|
1991-07-13
|
670b
|
26 lines
############################################################################
#
# Name: fcopy.icn
#
# Title: Copy a file
#
# Author: Robert J. Alexander
#
# Date: September 7, 1990
#
############################################################################
#
# Copies a file named fn1 to file named fn2.
#
############################################################################
procedure fcopy(fn1,fn2) # fn2
local f1, f2, buf
f1 := open(fn1,"ru") | stop("Can't open ",fn1)
f2 := open(fn2,"wu") | stop("Can't open ",fn2," for writing")
while buf := reads(f1,512) do writes(f2,buf)
every close(f2 | f1)
return fn2
end