Created
July 3, 2023 01:11
-
-
Save swharden/de8320a54983f84fb1ce16d873562773 to your computer and use it in GitHub Desktop.
Python script to rename all files in a folder to lowercase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script renames all files in a folder to lowercase | |
""" | |
import pathlib | |
import shutil | |
folder = "./full/" | |
for path in pathlib.Path(folder).glob("*.*"): | |
path2 = path.parent.joinpath(str(path.name).lower()) | |
shutil.move(path, path2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment