directory listing details

G

Guest

I have a simple directoy list bound to a datagrid. I can get the file names,
but is there a way to get the file information from system.io.directory. I'd
like to get file size, creation date, and dropping off the the path from the
file name would not hurt. This can all be done, i know, but i'd like some
advice on the quick simple way.
thanks
kes
(code)
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
Call databinder()
End If

End Sub
Sub databinder()
dgFiles.DataSource =
Directory.GetFiles("c:\websites\xxxx\upload\files")
dgFiles.DataBind()
End Sub
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
flFile1.PostedFile.SaveAs("c:\websites\xxxxxx\upload\files\" &
Path.GetFileName(flFile1.PostedFile.FileName))
Call databinder()
End Sub
 
G

Guest

Of course it does, but in others languages like cold fusion the file size and
all other attributes are a part of the file listing. Whe a call to the file
system is made all information is retreaved not just the file (qualified)
name. I was hoping it would be part of the Directory.getfiles call
thanks
kes
 

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

Top