473,508 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populate ListView Box with Current Directory Info

How can I populate a ListView Box with the current directory, filename, file
length, date created and date last modified?
I can get the current directory and length by using

Dim Path As String = System.IO.Directory.GetCurrentDirectory()

With Me.ListViewBox1
Item = New ListViewItem(Path)
Item.SubItems.Add(Path.Lenght)
..Items.Add(Item)
End With

But that’s all I can do. I would like to use a For Each Loop to iterate thru
each file till I come to the end.
Any ideals

--
thank You
Apr 1 '07 #1
1 2524
Gus,

Have a look beside the directory info class to the fileinfo class

http://msdn2.microsoft.com/en-us/lib....fileinfo.aspx

Cor

"Gus Chuch" <Gu******@discussions.microsoft.comschreef in bericht
news:46**********************************@microsof t.com...
How can I populate a ListView Box with the current directory, filename,
file
length, date created and date last modified?
I can get the current directory and length by using

Dim Path As String = System.IO.Directory.GetCurrentDirectory()

With Me.ListViewBox1
Item = New ListViewItem(Path)
Item.SubItems.Add(Path.Lenght)
.Items.Add(Item)
End With

But that's all I can do. I would like to use a For Each Loop to iterate
thru
each file till I come to the end.
Any ideals

--
thank You

Apr 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1818
by: Mr. B | last post by:
VB.net issue here. I've a strange event that I can't seem to figure out... On my Form, I've a TabControl (two Tabs)... On my first tab, I load an Ascii file and dump some info onto my...
2
2275
by: Sagaert Johan | last post by:
Hi I have set the columreorder to true Is there a way to get/set the current columnorder, so i can restore the order from a saved setting ? Johan
2
4708
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add...
3
9286
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data,...
3
2599
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
3
8067
by: shinedomain | last post by:
After select from a view, how to populate to listview? Is it possible to populate with images in the process?
6
9961
by: Beginner | last post by:
Hi, I'm trying to populate a TreeView from an existing and filled in ListView (lvwBuild). lvwBuild is a basic two column listview which can have any number of rows. I would like the first...
0
1133
by: John Rogers | last post by:
Can someone offer some advice. I have the following code that works to do a threaded file copy. private void CopyFolder(object o) { string sourceFolderPath = "Source Not Found"; string...
0
1388
by: MrColeyted | last post by:
I am designing an app that is similar to Windows Explorer. I have all working well. By clicking a directory in the treeview, the folders and files for that directory are displayed in the listview....
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.