|
Hello,
i registered the DirSize.dll, but I didn't found any new column named "Folder Size" or something to add to. I have got a german Version of Windows.. may be, thats the "failure"...?
Greetings
Sven
|
|
|
|
|
Sorry, to much details in the list.. I found it between 240 others...
|
|
|
|
|
i register dll. cmd gave me full registered msg but No extra Column after registering dll even checking with sort. can you help?
Abdullah GD (Mr.Green)
Focus Media Vision
|
|
|
|
|
Newbie in over his head, don't know anything about programming and shouldn't have installed the DirSize.dll but i did. Now Windows Explorer runs slowwwwwwww and i would like to remove said item but i'm sure its not as simple as deleting the file from my hard drive.
thank you
|
|
|
|
|
Go to Start/Run and type:
regsvr32 /u DirSize.DLL
If you put the .dll file in a folder somewhere then insert the folder name BEFORE the dirsize.dll.
Example: regsvr32 /u c:\dllfiles\DirSize.DLL
Pooja
|
|
|
|
|
|
Did u search in registry and deleted it?
|
|
|
|
|
How about adding the this folder size information, to
the Search (For Files or Folder) function of explorer?
IT would be much more useful, as you could spam multiple hard drives
|
|
|
|
|
Hello,
The dll does not work in Windows 98 although I
could register the dll successfully.
I am using VC++ 6.0 + SP5 but I can not rebuild
the DLL (more then 200 errors).
Cn anyone help me?
|
|
|
|
|
Dear John,
You need to have Windows 2000 and above to use this component. Win98 does not support column providers.
Cheers!
-Sharan
|
|
|
|
|
Dear Sharan
This is off topic, but I have a problem you may be able to advise me on. I have lost all the columns in Win98 explorer details view, and cannot find how to recover them.
Is it possible you can give me a clue on how to fix this.
Thanks
- Roger -
|
|
|
|
|
Hi i tried to install the dll with regsvr32 and it failed.
This error code was returned: 0x8007007e
Why doesnt it work? Im using WinXP Pro SWE. It that the problem?
That im using a swedish version of WinXP.
Any help would be appraciated.
|
|
|
|
|
Hi Basappa,
I have downloaded the zip file Dirsize.zip but I could not find any application file in that.
Pl. let me know how to install it in my PC?
I am not a guy from programming side. In my computer, there is no application like c, C++, VC, VC++, VB, etc...
Thanks and Regds...
Rajparikh.
|
|
|
|
|
To install it, unzip the DirSize.zip and at the command prompt type
"regsvr32 yourdrive:\path of the dll\dirsize.dll".
Eg. if you unzip the file in C:\Windows then type "regsvr32 c:\windows\dirsize.dll" to register it.
Then in the explorer, change the view to "Details", right click on the column's title bar, then select "Folder size" from the dropdown.
|
|
|
|
|
been looking for this a long time. great extension to explorer!!!
Thanx!
|
|
|
|
|
I was looking for this for a long time too, but from time to time it makes wrong calculations. I hope a new update come up soon.
|
|
|
|
|
How can we sort folders according to their size ?
Now clicking the column header sorts according to string.
Orcun Colak
|
|
|
|
|
Replace the GetItemData with this one:
STDMETHODIMP CColHandler::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
{
USES_CONVERSION;
V_VT(pvarData) = VT_BSTR; //VT_UI8;
DWORD64 dwSize = 0;
TCHAR szTmp[50];
DWORD dwFiles = 0, dwFolders = 0;
DWORD64 size = 0;
if(pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
dwSize = GetFolderSize(OLE2T(pscd->wszFile),&dwFiles,&dwFolders);
// size = dwSize/(1024*1024);
// if(size == 0)
// {
size = dwSize/1024;
if(size == 0)
{
_i64toa(dwSize,szTmp,10);
strcat(szTmp," Bytes");
}
else
{
_i64toa(size,szTmp,10);
strcat(szTmp," KB");
}
// }
// else
// {
// _i64toa(size,szTmp,10);
// strcat(szTmp," MB");
// }
V_BSTR(pvarData) = SysAllocString(T2OLE(szTmp));
}
else
{
V_BSTR(pvarData) = SysAllocString(T2OLE(""));
}
return S_OK;
}
Now the size is shown only in 'Bytes' or 'Kilo Bytes (KB)'.
If the size is to be sorted according to numbers then the units 'Bytes' or 'KB' cannot be displayed. Even the Microsoft displays only in KB and not in MB or GB. Only in property page shows in KB,MB or GB.
Cheers!
-Sharan
|
|
|
|
|
excuse me:
` The way u give may not work correctly. i found that, when using addin dll, explorer sorts files just according to the str_cmp function, but not the size value. so the 1st character has big weight on arranging items. then, 1 K may be the 1st one in the column, but not 9 K or 9,xxx,xxx KB.
~ but ms explorer does work in the order of size value. i need the reason.
regards!
|
|
|
|
|
I would appreciate if you could incorporate this change into the dll version rather than just giving source. I don't know how to build the dll from source
|
|
|
|
|
Replace the GetItemData with this one:
STDMETHODIMP CColHandler::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
{
USES_CONVERSION;
V_VT(pvarData) = VT_BSTR; //VT_UI8;
DWORD64 dwSize = 0;
TCHAR szTmp[50];
DWORD dwFiles = 0, dwFolders = 0;
DWORD64 size = 0;
if(pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
dwSize = GetFolderSize(OLE2T(pscd->wszFile),&dwFiles,&dwFolders);
// size = dwSize/(1024*1024);
// if(size == 0)
// {
size = dwSize/1024;
if(size == 0)
{
_i64toa(dwSize,szTmp,10);
strcat(szTmp," Bytes");
}
else
{
_i64toa(size,szTmp,10);
strcat(szTmp," KB");
}
// }
// else
// {
// _i64toa(size,szTmp,10);
// strcat(szTmp," MB");
// }
V_BSTR(pvarData) = SysAllocString(T2OLE(szTmp));
}
else
{
V_BSTR(pvarData) = SysAllocString(T2OLE(""));
}
return S_OK;
}
Now the size is shown only in 'Bytes' or 'Kilo Bytes (KB)'.
If the size is to be sorted according to numbers then the units 'Bytes' or 'KB' cannot be displayed. Even the Microsoft displays only in KB and not in MB or GB. Only property page shows in KB,MB or GB.
Cheers!
-Sharan
|
|
|
|
|
calculation is wrong if multiple sub-folders are used
|
|
|
|
|
I agree, it seems that the sum is limited to a 32 bit unsigned integer and then the result is a modulo of 4 GBytes.
|
|
|
|
|
Please replace these functions with the existing ones
STDMETHODIMP CColHandler::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData)
{
USES_CONVERSION;
V_VT(pvarData) = VT_BSTR;
DWORD64 dwSize = 0;
TCHAR szTmp[50];
DWORD dwFiles = 0, dwFolders = 0;
if(pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
DWORD64 size = 0;
dwSize = GetFolderSize(OLE2T(pscd->wszFile),&dwFiles,&dwFolders);
size = dwSize/(1024*1024);
if(size == 0)
{
size = dwSize/1024;
if(size == 0)
{
_i64toa(dwSize,szTmp,10);
strcat(szTmp," Bytes");
}
else
{
_i64toa(size,szTmp,10);
strcat(szTmp," KB");
}
}
else
{
_i64toa(size,szTmp,10);
strcat(szTmp," MB");
}
V_BSTR(pvarData) = SysAllocString(T2OLE(szTmp));
}
else
{
V_BSTR(pvarData) = SysAllocString(T2OLE(""));
}
return S_OK;
}
// This function is the private to this class. It is called with the folder
//path. It returns the size of the folder. This is made recursive to
//calculate the size of the nested folder(s) if any.
DWORD64 CColHandler::GetFolderSize(LPCTSTR szPath, DWORD *dwFiles, DWORD *dwFolders)
{
TCHAR szFileFilter[512];
TCHAR szFilePath[512];
HANDLE hFind = NULL;
WIN32_FIND_DATA fileinfo;
DWORD64 dwSize = 0;
strcpy(szFilePath,szPath);
strcat(szFilePath,"\\");
strcpy(szFileFilter,szFilePath);
strcat(szFileFilter,"*.*");
hFind = FindFirstFile(szFileFilter,&fileinfo);
do
{
if(fileinfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (!strcmp(fileinfo.cFileName,".") || !strcmp(fileinfo.cFileName,".."))
{
//Do nothing for "." and ".." folders
}
else
{
TCHAR sztmp[512];
strcpy(sztmp,szFilePath);
strcat(sztmp,fileinfo.cFileName);
dwSize = dwSize + GetFolderSize(sztmp);
if(dwFolders != NULL)
{
++(*dwFolders);
}
}
}
else
{
if(dwFiles != NULL)
{
++(*dwFiles);
}
}
dwSize += fileinfo.nFileSizeLow;
}while(FindNextFile(hFind,&fileinfo));
FindClose(hFind);
return dwSize;
}
Also change the signature of the <b>GetFolderSize </b>function in the Header file <b>'ColHandler.h' </b>.
You can use dwFolders, dwFiles variables. These gives number of folders and the files in the next level folder.
Happy Coding
-Sharan
|
|
|
|
|
Sharan - first, let me say thank you for making this simple, but very useful extension. For the code you mentioned above to fix the subfolder calculation, could you please update the compiled dll for those of us that can't for whatever reason? Thanks.
|
|
|
|
|