Apr-28-2024, 02:31 PM
(Apr-28-2024, 02:09 PM)Winfried Wrote: This finally works:You don't need to change the process' working directory for every subdirectory. A better code is
from pathlib import Path for subdir in Path(ROOT).iterdir(): if subdir.is_dir(): for file in subdir.glob('*.html'): print(file)
« We can solve any problem by introducing an extra level of indirection »