I want to select files from a folder. I use the following code:
from pathlib import Path
self.contents = list(curPath.iterdir())
f = self.contents[i]
name = os.path.basename(os.path.splitext(f)[0])
I have a folder with 66 items, self.contents has 66 items.
Sometimes it contains the correct names, sometimes, there are names with a '.' in the name.
perhaps it has to do with the mix of PathLib and OS.
The strange thing is that is can be working without the '.' for longer time and then suddenly it inludes the '.' files.
Any clue?
Many thanks!