How to get Folder size throuogh program
-
Hi All, I am using MFC Application , in that I want to get the specific folder size.So How can I do that?? i have the full path of the folder. Thanks in advance.
Ashish Bhatt
iam not sure if there is any function to find the whole folder size at a time. but using some functions, like findfirst and findnext, you can write a recursive function, which traverses the folder and its sub folders, sum the sizes of the files and return you the folder size. lets see if any master suggests any thing. gud luck. -------------------------------------------
Suggestion to the members: prefix your main thread subject with [SOLVED] if it is solved. chandu.
-
Hi All, I am using MFC Application , in that I want to get the specific folder size.So How can I do that?? i have the full path of the folder. Thanks in advance.
Ashish Bhatt
-
iam not sure if there is any function to find the whole folder size at a time. but using some functions, like findfirst and findnext, you can write a recursive function, which traverses the folder and its sub folders, sum the sizes of the files and return you the folder size. lets see if any master suggests any thing. gud luck. -------------------------------------------
Suggestion to the members: prefix your main thread subject with [SOLVED] if it is solved. chandu.
No I don't want to call function recursivly. I don't want to go on that way. Is there no any function which gives me the direct size of the folder just like file. Thanks..
Ashish Bhatt
-
Hi All, I am using MFC Application , in that I want to get the specific folder size.So How can I do that?? i have the full path of the folder. Thanks in advance.
Ashish Bhatt
ashishbhatt wrote:
...I want to get the specific folder size.So How can I do that??
You want the size of the folder itself, or the size of all files in the folder?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
No I don't want to call function recursivly. I don't want to go on that way. Is there no any function which gives me the direct size of the folder just like file. Thanks..
Ashish Bhatt
ashishbhatt wrote:
No I don't want to call function recursivly.
Then you're doomed to fail.
ashishbhatt wrote:
Is there no any function which gives me the direct size of the folder just like file.
He already told you no.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
ashishbhatt wrote:
...I want to get the specific folder size.So How can I do that??
You want the size of the folder itself, or the size of all files in the folder?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
You want the size of the folder itself, or the size of all files in the folder?
He probably doesn't know. He should consider changing his vocation to something a bit less mentally challenging, like working at a convenience store, or driving a taxi.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
DavidCrow wrote:
You want the size of the folder itself, or the size of all files in the folder?
He probably doesn't know. He should consider changing his vocation to something a bit less mentally challenging, like working at a convenience store, or driving a taxi.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
like working at a convenience store, or driving a taxi.
what about cleaning road!:->
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
Hamid. wrote:
See Xfoldersize - A class to determine folder size [^]
I Like this class very much!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
No I don't want to call function recursivly. I don't want to go on that way. Is there no any function which gives me the direct size of the folder just like file. Thanks..
Ashish Bhatt
ashishbhatt wrote:
No I don't want to call function recursivly. I don't want to go on that way. Is there no any function which gives me the direct size of the folder just like file.
Windows do that itself also. try seeing property of Windows folder of your computer , you could see change in size rapidly!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
Hamid. wrote:
See Xfoldersize - A class to determine folder size [^]
I Like this class very much!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
And you have an article that I like it.;)