Skip to content

Commit

Permalink
Move to a subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
tweirtx committed Mar 23, 2019
1 parent e49a586 commit 2ec0dac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ReMatch/mover.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class Mover:
def move(event_key):
os.mkdir(event_key)
os.mkdir("public/" + event_key)
if os.name == 'nt':
subprocess.call(f"move {event_key}_* {event_key}", shell=True)
subprocess.call(f"move {event_key}_* public/{event_key}", shell=True)
elif os.name == 'posix':
subprocess.call(f'mv {event_key}_* {event_key}', shell=True)
subprocess.call(f'mv {event_key}_* public/{event_key}', shell=True)
else:
print("I don't know how to deal with {}, exiting!".format(os.name))

Expand Down

0 comments on commit 2ec0dac

Please sign in to comment.