Answer the question
In order to leave comments, you need to log in
How to quickly make the contents of all files in a folder lowercase?
Subject.
There is a folder with tons of files, <130kb each.
You need to quickly bypass them all and make them in lower case.
As an option, write a Python script, but the fastest option is still interesting.
Answer the question
In order to leave comments, you need to log in
import sys
filename = sys.argv[1]
with open(filename, "r+") as f:
data = f.read()
f.truncate()
f.seek(0)
f.write(data.lower())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question