I am trying to group files into folders based on the prefix of the filename. Error: os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or in