[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: check a directory

Robert Bossy

2/25/2008 10:42:00 AM

Raj kumar wrote:
> Hi all,
> I'm using following code...
>
> for x in listdir(path)
> some code.....
>
> but how i can check whether x is a directory or not?
> Because listdir() is giving all the files present in that path....
Take a look at the module os.path, especially the functions named isdir
and walk.

RB