|
 |
|
|
i was trying to retrieve the path of the file / folder when user selects the file or folder. this selection is independent of the application running. implemented in ResumeGrabber Pro 5.0.
any help is highly appreciated.

Mastan Vali Shaik
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Great little app -- dying to see something like this in Vista. Any plans to go down that road?
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
And what will work for Vista how long will it last ? I love the MS policy that started with .Net (forgot to mention the version - this is important).
Yarp http://www.senosoft.com/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Well, I don't have an implementation (yet), but a quick view on MS site told me this needs to be done.
- implement IInitializeWithItem in Initialize, call IShellItem::GetDisplayName(SIGDN_FILESYSPATH, ..) to get the file path, then start with that path name
- implement IPropertyStore and define a property schema
- register dll during registration disable run fom indexer (DisableProcessIsolation) register for all files (is it possible?) and folders
- probably more 
Harald
PS: Too much work for now, sorry. MS docs: http://msdn2.microsoft.com/en-us/library/bb776861.aspx
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
great - although i found this site first!
still, doesn't appear to have the options people have been requesting here - namely size in MB, GB etc (as standard size column does) ..?
if anyone has managed to redevelop the demo version of this app to do these things (inc right align), could they pls stikck it up on the web somewhere so the rest of us non-coders could partake ..?
cheers ..! 8-)
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
FolderSize on Sourceforge does have an option for displaying in MB, GB, etc. You can see the options by clicking on the folder in the system tray. I'm working on a new version of that which I hope to release soon (within a month) that fixes some of its issues, and will move options like the display mode to a Control Panel. Please check foldersize.sourceforge.net for updates!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
in addition to showing it in MB, is there anyway to show the folder size with comas? I have huge folder sizes with digital video files in em. Some folders are 30GB in size. it is hard to see em easily. They look like this; __745588 KB 21370766 KB 15270845 KB 33450980 KB
if displayed in MB they'd look like this; ___745 MB _21370 MB _15270 MB _33450 MB
It's still confuseing. Is it possibly to put commas in so they look like this?; ___745 MB 21,370 MB 15,270 MB 33,450 MB
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
Hi, i'm boogie from Korea.
It is the exact source that i've been looking for! What a cool stuff that you've made~  ie plug-in for folder size calcuation, what a.. kkk
While i was reading ColHandler.cpp, i found something that would make your source code more perfect~ (if you correct it)
In GetFolderSize() in ColHandler.cpp, there is recursive function call as follows.
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); // THIS LINE : FUNCTION_RECURSION if(dwFolders != NULL) { ++(*dwFolders); } }
I think it's more perfect if you correct that line like this:
dwSize = dwSize + GetFolderSize(sztmp, dwFiles, dwFolders);
This modification doesn't need to be done unless you use dwFiles or dwFolders variables. But if you do, you cannot get the right result if you don't change that line.
Anyway, thanks for registering your source code into this site. That's been great helpful to me 
Regards,
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I need that it show the file size in MB, actually have showing in this format:
138786567 KB
without points, it appears to be very hard to understand.
I want that it show like this: 138 MB
Thanks a lot.
W R Computadores Colombia Bogotá D.C.
|
| Sign In·View Thread·PermaLink | 2.50/5 (5 votes) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
Here is code which convert size into String, with respective postfixes like MB, GB, KB, B etc and also display round off fractions upto two digits.
//---------------------------------------------------------------------------- char * GetSizeString(unsigned long size,char str[]) { char temp[100]="";
double dsize=size; if (size==0) { ultoa(size,temp,10); strcat(temp," KB"); } else if (size<1024) { ultoa(size,temp,10); strcat(temp," B"); } else if (size<1048576) { ULONG rem=size/1024; ULONG deciml=size- (rem*1024); ultoa(rem,temp,10);
if (deciml!=0) { char temp1[10]; strcat(temp,"."); ultoa(deciml,temp1,10); temp1[2]=NULL; strcat(temp,temp1); } strcat(temp," KB"); } else if (size < 1073741824) { //dsize /= 1048576.0; ULONG rem=size/1048576; ULONG deciml=size- (rem*1048576); ultoa(rem,temp,10);
if (deciml!=0) { char temp1[10]; strcat(temp,"."); ultoa(deciml,temp1,10); temp1[2]=NULL; strcat(temp,temp1); }
//doubleToString(dsize,temp,2);
//gcvt(dsize,5,temp);
strcat(temp," MB");
} else { //dsize /= 1073741824.0; ULONG rem=size/1073741824; ULONG deciml=size- (rem*1073741824); ultoa(rem,temp,10);
if (deciml!=0) { char temp1[10]; strcat(temp,"."); ultoa(deciml,temp1,10); temp1[2]=NULL; strcat(temp,temp1); }
//gcvt(dsize,2,temp); strcat(temp," GB"); }
strcpy(str,temp); return str; } //--------------------------------------------------------------------------
Ayaz
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
The screenshot showd the size in mb. The alignment should also have been changed to "right".
|
| Sign In·View Thread·PermaLink | 5.00/5 (4 votes) |
|
|
|
 |
|
|
Search for LVCFMT_LEFT in the project and change it to RIGHT to get right alignment. Also search for the line size = dwSize/(1024*1024); in ColHandler.cpp and uncomment the section to convert to MB.
|
| Sign In·View Thread·PermaLink | 3.29/5 (4 votes) |
|
|
|
 |
|
|
I'm not a coder, just a user happy to find this. Any chance someone could post a version for MB, right aligned? Would be greatly appreciated!
|
| Sign In·View Thread·PermaLink | 4.50/5 (3 votes) |
|
|
|
 |