I am trying to copy all the contents of a folder from one directory to another, but the final destination path is outside of the current working directory that Python is searching though.
How do I find this location without explicitly stating it?
Here's what I have:
from Myro import *
import shutil
import os
import sys
def imageSync():
path1 = os.path.abspath("5-1-15 upload")
path2 = "C:\Users\Owner\Pictures\plsWork"
#path2 = sys.path.inset(0, 'C:\Users\Owner\Pictures\plsWork')
listing = os.listdir(path1)
for image in listing:
shutil.copy2( os.path.join(path1, image), path2)
I guess my problem is similar to: Importing files from different folder in Python. But I tried those suggestions and received a Type Error, so I commented out my attempts that didn't work.
Thanks for the help!