Skip to content

Instantly share code, notes, and snippets.

@alirezas
Created August 7, 2017 08:57
Show Gist options
  • Save alirezas/b63cd56c3460d2b530004b49f59b4ce2 to your computer and use it in GitHub Desktop.
Save alirezas/b63cd56c3460d2b530004b49f59b4ce2 to your computer and use it in GitHub Desktop.
Rename filenames in a directory to lowercase in python.
import os
path = os.chdir('DIRECTORY_PATH')
files = os.listdir(path)
for file in files:
os.rename(file, file.lower())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment