Skip to content

Instantly share code, notes, and snippets.

@hendrikleper
hendrikleper / move.py
Last active December 16, 2018 23:07 — forked from ikluhsman/move.py
Python: move files to creation date named directories
#!/usr/local/bin/python3
#use with 'python move.py /myDirectory/'
import os, time, shutil, sys
dir = sys.argv[1]
os.chdir(dir)
for f in os.listdir('.'):
ftime = time.gmtime(os.path.getmtime(f))
year = str(ftime.tm_year)
mon = str(ftime.tm_mon)

Keybase proof

I hereby claim:

  • I am hendrikleper on github.
  • I am hik (https://keybase.io/hik) on keybase.
  • I have a public key ASDqLLbTWm9y2sDPCK0mry-led8Ut5nHGwzR43a8AnCVFwo

To claim this, I am signing this object: