Get the size of a specified folder
-
Hi, I want to get the size of a specified folder like this : HANDLE hDir = CreateFile ("C:\\MyFolder", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); Then i pass a directory handle to the GetFileSize function DWORD isize = GetFileSize(hDir, NULL /*lpfilesize*/ ); This code don't work. I try this second function : PLARGE_INTEGER lpFileSize; GetFileSizeEx( hDir, lpFileSize ); It don't work Can anybody help me. Thanks in advance
-
Hi, I want to get the size of a specified folder like this : HANDLE hDir = CreateFile ("C:\\MyFolder", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); Then i pass a directory handle to the GetFileSize function DWORD isize = GetFileSize(hDir, NULL /*lpfilesize*/ ); This code don't work. I try this second function : PLARGE_INTEGER lpFileSize; GetFileSizeEx( hDir, lpFileSize ); It don't work Can anybody help me. Thanks in advance
ummm a folder doesn't have a size as such ... its the sum of the sizes of all the files / folders in the folder do a recursive filesize thing and add them all together :suss:
"... and so i said to him ... if it can't dance and you can't eat it either f**k it or throw it away"
8028finder.com -
Hi, I want to get the size of a specified folder like this : HANDLE hDir = CreateFile ("C:\\MyFolder", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); Then i pass a directory handle to the GetFileSize function DWORD isize = GetFileSize(hDir, NULL /*lpfilesize*/ ); This code don't work. I try this second function : PLARGE_INTEGER lpFileSize; GetFileSizeEx( hDir, lpFileSize ); It don't work Can anybody help me. Thanks in advance
No, you need to get the size of each file in the folder...;) Best Reagards... Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini