populate datagrid with file attributes

B

bg

I would like to populate a DataGrid with some of the files of a folder and
also list file size, created time and the difference from NOW to the created
time in minutes. Because these files have various extensions I will need to
call each file specifically as "This file.txt" & "This other file.trc". I
have populated the datagrid with the contents of 1 file with the following
code. How do I add the next file info to the datagrid? Also How do I perform
the Date()-DateValue(CreationTime) and return minutes and bind it to a
column?

strPath ="||path\here\"

Dim dirinfo As New DirectoryInfo(strpath)

dgFiles.DataSource = dirinfo.GetFiles("This file.txt")

dgFiles.DataBind()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top