I am very new to python and am trying to understand the below code to possibly chop it up and use it to my advantage it used in ESRI ArcMAP 9.1
Would someone please annotate the below code:
import os, os.path, shutil
dir1 = "c:/temp2"
dir2 = "c:/temp3"
fileList = os.listdir(dir1)
for inFile in fileList:
aFile = os.path.basename(inFile)
if aFile <> "":
inFile = str(dir1 + "/" + inFile)
outFile = str(dir2 + "/" + aFile)
print "Input file: " + inFile
print "Output file: " + outFile
print "Unable to copy " + inFile + " to " + outFile
Thank you kindly,