Skip to content

Instantly share code, notes, and snippets.

@claudijd
Created January 3, 2020 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudijd/c3d1655d73030f5bb860c39db1e9103c to your computer and use it in GitHub Desktop.
Save claudijd/c3d1655d73030f5bb860c39db1e9103c to your computer and use it in GitHub Desktop.
Clean desktop
import os
import shutil
path = "/Users/jclaudius/Desktop/"
moveto = "/Users/jclaudius/Desktop/Archive/"
files = os.listdir(path)
files.sort()
for f in files:
if not os.path.isdir(f):
src = path+f
dst = moveto+f
shutil.move(src, dst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment