I create some directories using os.mkdir
try:
#YOUR CODE GOES HERE
os.mkdir("/tmp/cats-v-dogs/")
os.mkdir("/tmp/cats-v-dogs/training/cats")
os.mkdir('/tmp/cats-v-dogs/training/dogs/')
os.mkdir('/tmp/cats-v-dogs/testing/cats')
os.mkdir('/tmp/cats-v-dogs/testing/dogs')
except OSError:
pass
I have list: training =[dog1,dog2,...,dog100] TRAINING_DOGS_DIR = "/tmp/cats-v-dogs/training/cats/" I want to copy a file from one directory to another one using trainig element:
for list1 in training:
copyfile(os.path.join(SOURCE,list1),TRAINING_DOGS_DIR)
After I run that loop this is the error I get:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/cats-v-dogs/training/dogs/'
Some help or suggestion thanks/