Skip to content

Instantly share code, notes, and snippets.

@lemonlatte
Last active December 4, 2017 14:21
Show Gist options
  • Save lemonlatte/38ecce780c90063f634bb6287e2ff179 to your computer and use it in GitHub Desktop.
Save lemonlatte/38ecce780c90063f634bb6287e2ff179 to your computer and use it in GitHub Desktop.
import os
for root, dirs, files in os.walk("/var/lib/assets"):
for f in files:
try:
print(f)
except:
os.rename(root + '/' + f, root + "/renamed-file")
print(root, files)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment