finding the size of all the files present in a folder

Discussion in 'Visual Basic ( VB )' started by harish13, Jul 28, 2006.

  1. harish13

    harish13 New Member

    Joined:
    Jul 20, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    i want to find the total size of all files present in a folder how can i do this
    thank u in advance
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Use FindFirstFile API which searches a directory for a file whose name matches the specified filename. FindFirstFile examines subdirectory names as well as filenames. If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile and calculate the size of each file and add up to find the size of the folder.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice