Count the number of files in a directory using python
        Posted  
        
            by prosseek
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by prosseek
        
        
        
        Published on 2010-04-13T18:38:38Z
        Indexed on 
            2010/04/13
            22:32 UTC
        
        
        Read the original article
        Hit count: 332
        
I need to count the number of files in a directory using Python. I guess the easiest way is len(glob.glob('*')), but I also count the directory as file.
Is there any way to count only the files in a directory?
© Stack Overflow or respective owner