12/13/2022

search all certain files recursively including subfolder - python example

 

refer to code

..

from pathlib import Path
mypath = "folder1/folder2"
for path in Path(annotation_addr).rglob('*.json'):
print(path) #full path
print(path.name) #file name

..


Thank you.

www.marearts.com

๐Ÿ™‡๐Ÿป‍♂️

No comments:

Post a Comment