the time wrote this edition in this test run copied tree of , files and directories in seconds on my woefully underpowered netbook machine (the builtin time clock call is used to query the system time in seconds)it may run arbitrarily faster or slower for you stillthis is at least as fast as the best drag-and-drop 've timed on this machine so how does this script work around bad files on cd backupthe secret is that it catches and ignores file exceptionsand it keeps walking to copy all the files that are good on cdi simply run command line such as this onec:\pp \system\filetoolspython cpall py :\examples :\pp \examples because the cd is addressed as " :on my windows machinethis is the commandline equivalent of drag-and-drop copying from an item in the cd' top-level folderexcept that the python script will recover from errors on the cd and get the rest on copy errorsit prints message to standard output and continuesfor big copiesyou'll probably want to redirect the script' output to file for later inspection in generalcpall can be passed any absolute directory path on your machineeven those that indicate devices such as cds to make this go on linuxtry root directory such as /dev/cdrom or something similar to address your cd drive once you've copied tree this wayyou still might want to verifyto see howlet' move on to the next example comparing directory trees engineers can be paranoid sort (but you didn' hear that from meat least am it comes from decades of seeing things go terribly wrongi suppose when create cd backup of my hard drivefor instancethere' still something bit too magical about the process to trust the cd writer program to do the right thing maybe shouldbut it' tough to have lot of faith in tools that occasionally trash files and seem to crash my windows machine every third tuesday of the month when push comes to shoveit' nice to be able to verify that data copied to backup cd is the same as the original-or at least to spot deviations from the original--as soon as possible if backup is ever neededit will be really needed because data cds are accessible as simple directory trees in the file systemwe are once again in the realm of tree walkers--to verify backup cdwe simply need to walk its top-level directory if our script is general enoughwe will also be able to use it to verify other copy operations as well-- downloaded tar fileshard-drive backupsand so on in factthe combination of the cpall script of the prior section and general tree comparison would provide portable and scriptable way to copy and verify data sets we've already studied generic directory tree walkersbut they won' help us here directlywe need to walk two directories in parallel and inspect common files along the way moreoverwalking either one of the two directories won' allow us to spot files complete system programs