Display all file under a Directory : Directory « File Directory « VB.Net

VB.Net
1. 2D
2. Application
3. Class
4. Data Structure
5. Database ADO.net
6. Development
7. Event
8. File Directory
9. Generics
10. GUI
11. Language Basics
12. Network Remote
13. Thread
14. Windows System
15. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net Tutorial
VB.Net » File Directory » DirectoryScreenshots 
Display all file under a Directory
Display all file under a Directory

Imports System
Imports System.IO

Public Class MainClass

   Shared Sub Main()
         Dim fileName As String
         fileName = "C:\"
         
            Dim directoryList As String() ' array for directories
            Dim i As Integer

            directoryList = Directory.GetDirectories(fileName)

            Console.WriteLine("Directory contents:" )

            ' output directoryList contents
            For i = 0 To directoryList.Length - 1
               Console.WriteLine( directoryList(i) )
            Next

   End Sub ' Main

End Class
 


           
       
Related examples in the same category
1. Get all directories
2. Recursive Directory InfoRecursive Directory Info
3. Display Directory TreeDisplay Directory Tree
4. List files and directories in rootList files and directories in root
5. Directory Information: name, last update and create timeDirectory Information: name, last update and create time
6. Update Directory: create time, last access time and last write timeUpdate  Directory: create time, last access time and last write time
7. Get Root directory and current directoryGet Root directory and current directory
8. Directory SeparatorDirectory Separator
9. Get Current DirectoryGet Current Directory
10. Get file in the parent folder Get file in the parent folder
11. Find a file: search directory recursively
w___w___w__.___j__av___a__2___s___._c__o__m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.