# https://www.kaggle.com/c/dogs-vs-cats/data?select=test1.zipv

import os, shutil

try:
    os.mkdir("/home/ashvin/Downloads/train/cats")
    os.mkdir("/home/ashvin/Downloads/train/dogs")
except OSError:
    pass

for file in os.listdir("/home/ashvin/Downloads/train"):
    print(file)
    if "cat" in file:
        shutil.move("/home/ashvin/Downloads/train/" + file, "/home/ashvin/Downloads/train/cats")
    else:
        shutil.move("/home/ashvin/Downloads/train/" + file, "/home/ashvin/Downloads/train/dogs")


91b9292e383c6597687cb3903ec7b60e09a2eb07
<mask token>

<mask token>
try:
    os.mkdir('/home/ashvin/Downloads/train/cats')
    os.mkdir('/home/ashvin/Downloads/train/dogs')
except OSError:
    pass
for file in os.listdir('/home/ashvin/Downloads/train'):
    print(file)
    if 'cat' in file:
        shutil.move('/home/ashvin/Downloads/train/' + file,
            '/home/ashvin/Downloads/train/cats')
    else:
        shutil.move('/home/ashvin/Downloads/train/' + file,
            '/home/ashvin/Downloads/train/dogs')

import os, shutil
try:
    os.mkdir('/home/ashvin/Downloads/train/cats')
    os.mkdir('/home/ashvin/Downloads/train/dogs')
except OSError:
    pass
for file in os.listdir('/home/ashvin/Downloads/train'):
    print(file)
    if 'cat' in file:
        shutil.move('/home/ashvin/Downloads/train/' + file,
            '/home/ashvin/Downloads/train/cats')
    else:
        shutil.move('/home/ashvin/Downloads/train/' + file,
            '/home/ashvin/Downloads/train/dogs')

# https://www.kaggle.com/c/dogs-vs-cats/data?select=test1.zipv

import os, shutil

try:
    os.mkdir("/home/ashvin/Downloads/train/cats")
    os.mkdir("/home/ashvin/Downloads/train/dogs")
except OSError:
    pass

for file in os.listdir("/home/ashvin/Downloads/train"):
    print(file)
    if "cat" in file:
        shutil.move("/home/ashvin/Downloads/train/" + file, "/home/ashvin/Downloads/train/cats")
    else:
        shutil.move("/home/ashvin/Downloads/train/" + file, "/home/ashvin/Downloads/train/dogs")

