Aug-07-2021, 06:02 AM
(Aug-06-2021, 11:06 PM)bowlofred Wrote: Modify your code above to become a function. Have the function take the name of the file and operate on it.
Then use glob.glob or Path.iterdir() (or os.scandir) to get all the files in a directory that you want. Loop over them and pass the filenames or filepaths to your function.
Sorry to be so annoying but how do i do this exactly?
I'm pretty new to python