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
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