David777
asked on
How can I get a folder's attribute like size and so on and quote it in VB
Dear all,
I want to sort all subfolders by size under a folder. But I don't know how I can get it and quote it in VB.
any suggestion will be highly appreciated.
David777
I want to sort all subfolders by size under a folder. But I don't know how I can get it and quote it in VB.
any suggestion will be highly appreciated.
David777
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Opps! take out the ctr and ctr2 and lngSize and "Whoohoo!". I used them for testing.
hearing...
Any progress?
RichW,
I am attempting to use your code but am receiving the following error:
"Compile error: User-defined type not defined"
This occurs on the line of code:
Dim fso as Scripting.FileSystemObject
Any ideas why??
I am attempting to use your code but am receiving the following error:
"Compile error: User-defined type not defined"
This occurs on the line of code:
Dim fso as Scripting.FileSystemObject
Any ideas why??
you have to set a reference to microsoft scrypting in your project.
Go to project/references... menu and locate that library. Do a check mark and push OK button.
Cheers
Go to project/references... menu and locate that library. Do a check mark and push OK button.
Cheers
I originally said to set a reference to the Microsoft Scripting Runtime object.
You can't use the FileSystemObject without setting a reference to it first.
Thanks, Richie.
:)
You can't use the FileSystemObject without setting a reference to it first.
Thanks, Richie.
:)
You are welcome.
By the way, i prefer to use references but using CreateObject, reference is not necessary.
Cheers
By the way, i prefer to use references but using CreateObject, reference is not necessary.
Cheers
Hi David777,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept RichW's comment(s) as an answer.
David777, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept RichW's comment(s) as an answer.
David777, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
Pathname = "D:/My Documents/ReadMe.txt"
a = FileLen(Pathname)