Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- def find (name, path):
- results = []
- for root, dirs, files in os.walk(path):
- for x in files:
- if path.endswith(name + '.rar'):
- results.append(os.path.join(root, name))
- print('yes')
- shutil.move(name, 'testfolder')
- else:
- print('no')
- return os.path.join(root, name)
- find(name = 'abc12', path = '/home/malachi/Desktop/projects/modorg')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement