OnlineKnowledgeRepository
OnlineKnowledgeRepository
OnlineKnowledgeRepository
Would you like to react to this message? Create an account in a few clicks or log in to continue.


For Questions and Assistance please use the proper Category.. please..
 
HomeLatest imagesSearchRegisterLog in
Welcome guys!!.. In order for you guys to post your Questions and assistance requests,, please REGISTER first.. Only members can post.. If you have requests then feel free to email ADMIN neuron or SPAMMER onatzky.. thanks!
Search
 
 

Display results as :
 
Rechercher Advanced Search
Donation box
Latest topics
» Convert signed ZD to PD
How to know the content of a folder and get their attributes EmptyThu Sep 01, 2016 7:57 pm by neuron

» Abia State Polytechnic Admission form for 2013/2014 out!
How to know the content of a folder and get their attributes EmptyTue Oct 08, 2013 9:30 am by stevejoo

» Convert ZD to SIGNED PD
How to know the content of a folder and get their attributes EmptySun Sep 08, 2013 9:22 pm by neuron

» How to Speed Up My PC
How to know the content of a folder and get their attributes EmptyTue Feb 26, 2013 9:15 am by alphysudaria143

» Hi I'm alphysudaria143
How to know the content of a folder and get their attributes EmptySun Feb 17, 2013 12:25 am by alphysudaria143

» How to Copy all the Generations of a GDG
How to know the content of a folder and get their attributes EmptyThu Oct 11, 2012 8:30 am by neuron

» Remove Duplicates in a dataset though Sort
How to know the content of a folder and get their attributes EmptyThu Oct 11, 2012 8:23 am by neuron

» how to insert data into your access database vb.net
How to know the content of a folder and get their attributes EmptyTue Aug 14, 2012 9:56 am by neuron

» how to populate combobox in vb.net during form load
How to know the content of a folder and get their attributes EmptyTue Aug 14, 2012 9:53 am by neuron

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Help
Please support me my registering to NEOBUX
advertisements
How to know the content of a folder and get their attributes Banner3
Affiliates
free forum
 



 

 How to know the content of a folder and get their attributes

Go down 
AuthorMessage
neuron
Administrator
Administrator
neuron


Posts : 38
Join date : 2009-08-06

How to know the content of a folder and get their attributes Empty
PostSubject: How to know the content of a folder and get their attributes   How to know the content of a folder and get their attributes EmptySat Aug 08, 2009 12:38 am

code is very useful in determining not only the size but also the type of file.
Code:

Imports System.IO
Module Module1

    Sub Main()


        Dim strFileSize As String = ""
        Dim di As New IO.DirectoryInfo("<path here with filename>")
        Dim aryFi As IO.FileInfo() = di.GetFiles("*.*")
        Dim fi As IO.FileInfo

        For Each fi In aryFi
            strFileSize = (Math.Round(fi.Length / 1024)).ToString()
            Console.WriteLine("File Name: {0}", fi.Name)
            Console.WriteLine("File Full Name: {0}", fi.FullName)
            Console.WriteLine("File Size (KB): {0}", strFileSize)
            Console.WriteLine("File Extension: {0}", fi.Extension)
            Console.WriteLine("Last Accessed: {0}", fi.LastAccessTime)
            Console.WriteLine("Read Only: {0}", (fi.Attributes.ReadOnly = True).ToString)
        Next
        Console.ReadLine()
    End Sub

End Module
Back to top Go down
https://myonlinekr.forumotion.com
 
How to know the content of a folder and get their attributes
Back to top 
Page 1 of 1
 Similar topics
-
» Copy from 1 folder to another in VB.NET
» How to Check and create a folder in VB.NET

Permissions in this forum:You cannot reply to topics in this forum
OnlineKnowledgeRepository :: All About PC :: Programming :: VB.NET-
Jump to: