subdirectories along the wayc:\pp \internet\ftp\mirroruploadall py website-training password for lutz on learning-python comconnecting uploading website-training\ -public-classes htm to -public-classes htm text uploading website-training\ -public-classes html to -public-classes html text uploading website-training\about html to about html text uploading website-training\books to books directory created uploading website-training\books\index htm to index htm text uploading website-training\books\index html to index html text uploading website-training\books\_vti_cnf to _vti_cnf directory created uploading website-training\books\_vti_cnf\index htm to index htm text uploading website-training\books\_vti_cnf\index html to index html text directory exited directory exited uploading website-training\calendar html to calendar html text uploading website-training\contacts html to contacts html text uploading website-training\estes-nov htm to estes-nov htm text uploading website-training\formalbio html to formalbio html text uploading website-training\fulloutline html to fulloutline html text lines omitted uploading website-training\_vti_pvt\writeto cnf to writeto cnf uploading website-training\_vti_pvt\_vti_cnf to _vti_cnf directory created uploading website-training\_vti_pvt\_vti_cnf\_x_todo htm to _x_todo htm text uploading website-training\_vti_pvt\_vti_cnf\_x_todoh htm to _x_todoh htm text directory exited uploading website-training\_vti_pvt\_x_todo htm to _x_todo htm text uploading website-training\_vti_pvt\_x_todoh htm to _x_todoh htm text directory exited done files and directories uploaded as isthe script of example - handles only directory tree uploadsrecursive uploads are generally more useful than recursive downloads if you maintain your websites on your local pc and upload to server periodicallyas do to also download (mirrora website that has subdirectoriesa script must parse the output of remote listing command to detect remote directories for the same reasonthe recursive upload script was not coded to support the remote directory tree cleanup option of the original--such feature would require parsing remote listings as well the next section shows how deleting remote trees one last example of code reuse at workwhen initially tested the prior section' upload-all scriptit contained bug that caused it to fall into an infinite recursion loopand keep copying the full site into new subdirectoriesover and overuntil the ftp server kicked me off (not an intended feature of the program!in factthe upload got levels deep before being killed by the serverit effectively locked my site until the mess could be repaired transferring directory trees with ftplib