# Purpose: Read the input file and write it to another file.
#          A simple file read/write example
# Usage: No arguments required.  Input file hard-coded.
# Output: Modified text file RDUout.txt in the scratch directory.
inputFile = "C:/gispy/data/ch19/RDUforest.txt"
outputFile = "C:/gispy/scratch/RDUout.txt"

inf = open(inputFile, 'r')
outf = open(outputFile, 'w')

for line in inf:
    outf.write(line)

inf.close()
outf.close()
print("{0} created.".format(outputFile))

# This could also be accomplished with the following code:
##inf = open(inputFile, 'r')
##outf = open(outputFile, 'w')
##
##contents = inf.read()
##outf.write(contents)
##
##inf.close()
##outf.close()

