This is my first time making a question. I'm working in an application to copy certain information (from my PC) into 2 UBS's Drives at the same time, also, I'd to link a ProgressBar to each process, so everyone can see the progress of the copy.
Questions
How I can start the two "copy process" at the same time and not sequentially.
How I can add the Progressbar to each "copy process."
Thanks in advance.. really appreciate your help...!!!
Please see below my code:
import os
import time
import easygui
import sys
import glob
import shutil
from subprocess import check_output
import win32api
from setuptools import setup, find_packages
import progressbar
import subprocess
Device_E = "E:" ##(USB 1)
Device_F = "F:" ##(USB 2)
##Making sure USB is plugged
USB_E = os.path.isdir(Device_E)
if USB_E == True:
Status = 'Pass'
else:
if USB_E == False:
Status = 'Fail'
ynbox = easygui.ynbox(msg='USB E Drive Not Found… Shall I continue ?', choices=('YES','NO'))
if ynbox == 1:
pass
else:
sys.exit()
if Status == 'Pass':
check_output("format E: /Y/Q", shell=True)
os.chdir(Source_Files)
check_output("xcopy *.* e:\ /j/y/e/v", shell=True)### Need to add the processBar to this task
USB_F = os.path.isdir(Device_F)
if USB_F == True:
Status = 'Pass'
else:
if USB_F == False:
Status = 'Fail'
ynbox = easygui.ynbox(msg='USB F Drive Not Found… Shall I continue ?', choices=('YES','NO'))
if ynbox == 1:
pass
else:
sys.exit()
if Status == 'Pass':
check_output("format F: /Y/Q", shell=True)
os.chdir(Source_Files)
check_output("xcopy *.* F:\ /j/y/e/v", shell=True)