Apr-12-2023, 04:42 AM
(This post was last modified: Apr-12-2023, 04:42 AM by snippsat.
Edit Reason: Added code tag
)
from pathlib import Path
from os import fspath
dest = r'C:\bar'
with open('out1.txt', 'w') as f:
for path in Path(dest).rglob('*'):
if path.is_file():
print(path)
f.write(f'{fspath(path)}\n')
snippsat write Apr-12-2023, 04:42 AM:
Added code tag in your post
Added code tag in your post
