Created
September 3, 2019 14:17
-
-
Save kieranjol/222ed6bb582d355ed5f137d0cc2546fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import shutil | |
import ififuncs | |
inputs = sys.argv[1] | |
for dirs in os.listdir(inputs): | |
full_path = os.path.join(inputs, dirs) | |
new_dir, ext = (os.path.splitext(full_path)) | |
if not os.path.isdir(new_dir): | |
os.makedirs(new_dir) | |
else: | |
print new_dir | |
if new_dir in full_path: | |
if os.path.isfile(full_path): | |
print('%s will be moved into %s' % (full_path, new_dir)) | |
#shutil.move(full_path, new_dir) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment