count = 0
with open('G:/XRAY/allnormal.txt', 'r') as openfile:
Lines = openfile.readlines()
for line in Lines:
check_file = os.path.exists('G:/purexray' + '/' + Lines[count].strip())
if check_file == True:
tmp = src + '/' + str(Lines[count].strip())
copyfile(tmp, dst)
count+=1
I get
PermissionError: [Errno 13] Permission denied: 'G:/normal' I use Win10