Progress Bar when copying files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ryno du preez
    New Member
    • Jul 2011
    • 91

    Progress Bar when copying files

    Hello All
    I'm new to Python And tkinter
    With that said I'm trying to write a simple code to show a progress bar while I'm copying files from one directory to another one. But all my efforts has turned out to be a waste of time. I wold really appreciate any help on this. The end result will be a Gui for the user to click on and the copy process will start.
    Code:
    import os
    import shutil
    # make sure that these directories exist
    dir_src = "Source directory"
    dir_dst = "Destination"
    for file in os.listdir(dir_src):
        print file  # testing
        src_file = os.path.join(dir_src, file)
        dst_file = os.path.join(dir_dst, file)
        shutil.copytree(src_file, dst_file)
Working...