473,669 Members | 2,458 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.Direc tory.GetCurrent Directory()

With Me.ListViewBox1
Item = New ListViewItem(Pa th)
Item.SubItems.A dd(Path.Lenght)
..Items.Add(Ite m)
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 2530
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******@discu ssions.microsof t.comschreef in bericht
news:46******** *************** ***********@mic rosoft.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.Direc tory.GetCurrent Directory()

With Me.ListViewBox1
Item = New ListViewItem(Pa th)
Item.SubItems.A dd(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
1836
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 ListView (which is located on my other Tab). Now IF I click on the 2nd Tab... the Info IS to be sorted out - as I've set
2
2289
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
4722
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 images to listview also(This is to list all the items in my inbox, and want to give the user the feel of outlook). Since it hangs for even 1000 items in the inbox, i tried to shift to virtual listview. But virtual listview
3
9297
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, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve the same results as I get with CheckListBox(s), where I am able to select (Check-mark) various checkboxs items and able to alter the data. I do...
3
2607
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 frm_nc_code As New frm_nc_sen frm_nc_code.Show( Well what I want to have happen is it loads the form then shows all of the controls on the form (especially the listview control which should be blank at this time)
3
8075
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
9967
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 column of lvwBuild to be a node and the second column to be a branch on the TreeView (hopefully I have the syntax correct). I've been researching how to do this but have come up empty. I'm guessing that you would fill an array from lvwBuild and...
0
1137
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 destinationFolderPath = "Destination Not Found"; bool overwrite = false;
0
1399
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. I want to know how to: By clicking a folder in the listview, expand and repopulate the corresponding node in the treeview. I have literally tried everything that I can think of, and I cannot get anything to work. This is for an assignment in...
0
8465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8895
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8809
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8588
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4206
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2797
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1788
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.