×

Discussion Board

Results 1 to 2 of 2

Thread: Number of files

  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    Number of files

    How can I get the amount of files in a directory?

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Number of files

    Adapted from: http://wiki.forum.nokia.com/index.ph...nd_directories

    Code:
    import os
    
    i=0
    folder="C:\\Python"
    for f in os.listdir(folder):
       i+=1
    print i   #i is the number of files
    Last edited by bogdan.galiceanu; 2008-04-02 at 05:07.

Similar Threads

  1. linking error
    By dakosurf in forum Symbian
    Replies: 1
    Last Post: 2008-03-27, 22:45
  2. Counting the number of files in a particular folder
    By MananW in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2006-04-20, 16:41
  3. SOLUTION :: SENDING FILES OVER BT on KEYPRESS
    By prasad_koli in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-01-08, 11:46
  4. encoding message centre number
    By udy1971 in forum General Messaging
    Replies: 3
    Last Post: 2002-10-24, 07:38
  5. Unicode Song Title In NSM Ringtone
    By mcai7db3 in forum Smart Messaging
    Replies: 3
    Last Post: 2002-08-28, 06:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •