Sep-30-2019, 04:30 AM
(Sep-29-2019, 07:35 PM)Larz60+ Wrote: if you use pathlib, testing if file exists is simple:
if filename.exists(): ...
testing if the file exists is not the issue. i was just describing an example special case reason to build a tree copy. yeah, it is a poor example because cp and rsync both have options to do this, so such a script really isn't needed. what i am trying to focus on is of this were a needed case and you built such a script, when it gets down to copying each individual file, how would other python coders choose to do it? by invoking a copy command or by opening the files and reading and writing all the data?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.