1

I was looking to do an similar script to this however noticed that when I ran the linked question it only looks at files within the root of the directory provided. can anyone give the best way to walk all the directory's in a folder (presuming you had something like the following):

c:\test c:\test\1 c:\test\2

and so on and wanted to search all files and folders in all folders not just the root

chase
  • 13
  • 3

1 Answers1

0
from pathlib import Path
r=Path(r"c:\\").rglob('system')
next(r)

or you can use 'for' to loop r.

ACE Fly
  • 305
  • 2
  • 8