rscott said:
Looking for help on how to create a page for a client that will find a
specific file on a local drive, upload it to the server, and then delete the
local copy, or allow them to respond and delete tehe local file.
You can try something like this snip to build a list of files in a table.
Then you can bind the table to datagrid or datalist, from there you can
create code to delete, copy etc your files.
Dim strarr as string()
dim dt as New datatable()
Dim myDataColumn1 As DataColumn= new datacolumn("FileName")
myDataColumn1.datatype=System.Type.GetType("System.String")
Dim myDataColumn2 As DataColumn= new datacolumn("LastWriteTime")
myDataColumn2.datatype=System.Type.GetType("System.DateTime")
dt.columns.add(myDatacolumn1)
dt.columns.add(myDatacolumn2)
strarr = Directory.GetFiles(strBindPath,"*???????????cart.xml") 'get list
of file and puts them in the array variable
'this iterates through the list and puts the file information in a datatable
Dim i as int32
for i = 0 to strArr.getupperbound(0)
dim fi as new fileinfo(strArr(i))
dim drw as datarow
drw = dt.newrow()
drw("FileName") = strArr(i)
drw("LastWriteTime") = fi.lastwritetime
dt.rows.add(drw)
next i