hi all!
how can we list all directory as well as file(all hirerchical) in python script by giving the path
as input

Recommended Answers

All 2 Replies

I suggest starting with os.path. Import the os module and use os.path.walk() and os.path.join() to get the filename syntax right on all OS versions.

Thanks BearofNH
I got the answer
Thanks so much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.