March 20th, 2005, 01:47 PM
Quick ftplib Question
I was just had a quick question about ftp.storbinary() in the ftplib module. When I do:
I know that open('monitor.xml') is the file that is being uploaded to the ftp server, but what I need to know:
ftp.storbinary('STOR monitor.xsl', open('monitor.xsl'))
is STOR monitor.xml uploading the file with the name monitor.xml? If I did:
Would Python upload monitor.xml with the file name of monitor2.xml?
ftp.storbinary('STOR monitor2.xsl', open('monitor.xsl'))
March 20th, 2005, 04:00 PM
You follow the STOR command by the name of the file you want to create, so whatever filename you do put after STOR – in this case monitor2.xsl – will be the name of the file created on the server .
March 20th, 2005, 04:10 PM