Roach
03-22-2004, 08:18 PM
I know it is a stupid question but I've been finding confusing results on google: I was looking for a way to declare a variable as a Folder object, so I can set the path and get info about the folder like size, date created, date altered, etc etc. I've been getting my info from http://www.juicystudio.com/tutorial/vb/files.asp#folder but there I am advised to dim an object as New FileSystemObject first, to use GetFolder and thus collect the needed info. It is said on that page that I need to add Microsoft Scripting Runtime Library to my References. I did that, and also imported System.IO, and proceeded to do the necessary dims, but apparently I can not dim as FileSystemObject, only as FileSystemObjectClass. Am I using a VB 6 tutorial for a .NET project? I've used the forum search option, but didn't find any good solutions.
On a side note, I'm using a FolderBrowserDialog so the user can pinpoint the folder he wants to start from (the program should make a nice overview of the total size contained in all the subfolders in this user-given 'root' folder), and have set dlgFolderBrowser.ShowNewFolderButton = False but still the New Folder button is shown when ShowDialog() is called. And yes, I've set it to false BEFORE i called ShowDialog. This is my secondary problem, I'm mainly looking for answers for my main problem described above.
Disclaimer: English is not my first language so if I was unclear at any time, please ask me to rephrase :)
Thanks in advance for helping me.
Roach
On a side note, I'm using a FolderBrowserDialog so the user can pinpoint the folder he wants to start from (the program should make a nice overview of the total size contained in all the subfolders in this user-given 'root' folder), and have set dlgFolderBrowser.ShowNewFolderButton = False but still the New Folder button is shown when ShowDialog() is called. And yes, I've set it to false BEFORE i called ShowDialog. This is my secondary problem, I'm mainly looking for answers for my main problem described above.
Disclaimer: English is not my first language so if I was unclear at any time, please ask me to rephrase :)
Thanks in advance for helping me.
Roach