-
Getting data from File List boxes
Hello,
I am having trouble getting info from my file list box. I am working on a
file comparison tool, I am not able to get the filename into the compare
dialog. I have no problem getting the drive and directory names/path, just
not the filename. I have double click and OK button events working fine but
not with the file name, the path stops at the directory level.
Also, is there an easy way to get file size info? I have attribute and date/time
but I can't find any documentation on getting the file size.
Thanks,
Don
-
Re: Getting data from File List boxes
Don,
Are you setting the file list box path property when the directory changes?
Private Sub dirDirectoryList_Change()
filFileList.Path = dirDirectoryList.Path
End Sub
Check out FileLen function to get the size of your file.
Craig Brown
"Don Fuller" <ponchrelo@hotmail.com> wrote:
>
>Hello,
>
>I am having trouble getting info from my file list box. I am working on
a
>file comparison tool, I am not able to get the filename into the compare
>dialog. I have no problem getting the drive and directory names/path, just
>not the filename. I have double click and OK button events working fine
but
>not with the file name, the path stops at the directory level.
>
>Also, is there an easy way to get file size info? I have attribute and date/time
>but I can't find any documentation on getting the file size.
>
>Thanks,
>
>Don
-
Re: Getting data from File List boxes
Don,
For the file names: This is a simple way to get them:
For X = 0 to file1.ListCount - 1
strFileName = file1.List(X)
' Do something here...
Next
Note that the file name will not be the complete path. If you need a fully-qualified
filename then use:
file1.Path & "\" & file1.List(X)
I apologize in advance if I am talking way under your level...
"Craig Brown" <brownc3@ing-afs.com> wrote:
>
>Don,
>
>Are you setting the file list box path property when the directory changes?
>
>Private Sub dirDirectoryList_Change()
>
>filFileList.Path = dirDirectoryList.Path
>
>End Sub
>
>Check out FileLen function to get the size of your file.
>
>Craig Brown
>
>
>"Don Fuller" <ponchrelo@hotmail.com> wrote:
>>
>>Hello,
>>
>>I am having trouble getting info from my file list box. I am working on
>a
>>file comparison tool, I am not able to get the filename into the compare
>>dialog. I have no problem getting the drive and directory names/path, just
>>not the filename. I have double click and OK button events working fine
>but
>>not with the file name, the path stops at the directory level.
>>
>>Also, is there an easy way to get file size info? I have attribute and
date/time
>>but I can't find any documentation on getting the file size.
>>
>>Thanks,
>>
>>Don
>
-
Re: Getting data from File List boxes
You could use the filename property
--
Dean Earley (dean.earley@icode.co.uk)
Assistant Developer
iCode Systems
"Don Fuller" <ponchrelo@hotmail.com> wrote in message news:3abbaae5$1@news.devx.com...
>
> Hello,
>
> I am having trouble getting info from my file list box. I am working on a
> file comparison tool, I am not able to get the filename into the compare
> dialog. I have no problem getting the drive and directory names/path, just
> not the filename. I have double click and OK button events working fine but
> not with the file name, the path stops at the directory level.
>
> Also, is there an easy way to get file size info? I have attribute and date/time
> but I can't find any documentation on getting the file size.
>
> Thanks,
>
> Don
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks