I have 2 scripts. One is an ftp program that takes a list of files and downloads them.

The other is a simple program that takes one file and copies it to another directory.

What I want to do:

When the ftp program finishes with one file, I want to run the copy program for that file, but I want the ftp program to move on to the next file while the copy runs.

So this would accomplish the same thing, but not be as effective for what I need to do:

for file in filelist:
10 Years
Discussion Span
Last Post by zachabesh

why do they need to be different files, couldn't you just make them definitions in the one file and then just call them when they are needed?


Downloading files takes alot of time, shutil.copy for big files isn't that fast itself, I know the computer can download and copy at the same time (saving some time, which adds up to alot if you're downloading hundreds of files), but if I wrote one big script for the whole thing, the functions wouldn't run simultaneously, they'd run right after each other.


I'll look that up thanks!

Also, I just came across shutil.move, seems like it would be faster than shutil.copy, could eliminate the need for 2 different scripts.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.