best way to copy a file [Q]

Bruno Mattarollo brunomadv at ciudad.com.ar
Sun Apr 11 13:33:55 EDT 1999


Hi!

	I need to copy a file (can be binary or ascii) from one path to another. I
have tryied to do:
	line = fd.readline()
	while line:
		fd2.write(line)
		line = fd.readline()
	fd.close()
	fd2.close()

	It only works for ascii files ... How can I do a 'copy' ...? I need to run
this on NT ...:(  And I don't want to open a shell to do a copy from
there... I also tryied fd.read() ... No success neither. I have looked
unsuccesfully throughout the documentation and didn't find a 'filecopy'
method. The files can range from 1KB to 600MB+ ...

	TIA and excuse my english ... :-)

/B

Bruno Mattarollo <bruno at gaiasur.com.ar>
... proud to be a PSA member <http://www.python.org/psa>





More information about the Python-list mailing list