API call in Windows that can retrieve the size of a folder ?? - Programmer

This is a discussion on API call in Windows that can retrieve the size of a folder ?? - Programmer ; API call in Windows that can retrieve the size of a folder ?? Folks, Does anyone know of a system call (where you give the name of a directory) and it retrieves the combined size of all the files in ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: API call in Windows that can retrieve the size of a folder ??

  1. API call in Windows that can retrieve the size of a folder ??

    API call in Windows that can retrieve the size of a folder ??

    Folks,

    Does anyone know of a system call (where you give the name of a directory)
    and it retrieves the combined size of all the files in the folder (doesn't
    have to be recursive), or a similiar call for a file????? Any suggestions
    would be appreciated

    Regards



  2. Re: API call in Windows that can retrieve the size of a folder ??

    "Peter McCarthy" wrote in message
    news:kW5qb.4362$bD.16732@news.indigo.ie...
    > Does anyone know of a system call (where you give the name of a directory)
    > and it retrieves the combined size of all the files in the folder (doesn't
    > have to be recursive), or a similiar call for a file????? Any suggestions
    > would be appreciated


    There isn't one. You'll have to recurse through the folder using
    FindFirst/FindNext/FindClose and add up the size of the individual items.

    --
    Tim Robinson (MVP, Windows SDK)
    http://www.themobius.co.uk/



  3. Re: API call in Windows that can retrieve the size of a folder ??

    Thanks for that. do you know the call for finding the size of a file (i.e.
    give it a file name and it returns the size of the file).
    Regards


    "Tim Robinson" wrote in message
    news:boavg5$1bgni0$1@ID-103400.news.uni-berlin.de...
    > "Peter McCarthy" wrote in message
    > news:kW5qb.4362$bD.16732@news.indigo.ie...
    > > Does anyone know of a system call (where you give the name of a

    directory)
    > > and it retrieves the combined size of all the files in the folder

    (doesn't
    > > have to be recursive), or a similiar call for a file????? Any

    suggestions
    > > would be appreciated

    >
    > There isn't one. You'll have to recurse through the folder using
    > FindFirst/FindNext/FindClose and add up the size of the individual items.
    >
    > --
    > Tim Robinson (MVP, Windows SDK)
    > http://www.themobius.co.uk/
    >
    >




  4. Re: API call in Windows that can retrieve the size of a folder ??

    "Peter McCarthy" wrote in message
    news:dx7qb.4386$bD.16748@news.indigo.ie...
    > Thanks for that. do you know the call for finding the size of a file (i.e.
    > give it a file name and it returns the size of the file).


    You want to Get a File Size? Maybe GetFileSize will work.

    FindFirstFile will get a file's information given the name.

    --
    Tim Robinson (MVP, Windows SDK)
    http://www.themobius.co.uk/



+ Reply to Thread