system.io

  • Thread starter Thread starter maft
  • Start date Start date
The following is a code sample I used:

Dim strArchivo, strHref, strVirtualParam As String

Dim strArrArchivos As String()

strArrArchivos = IO.Directory.GetFiles(strPathActualParam)

For Each strArchivo In strArrArchivos

strHref = strVirtual & "/" & strArchivo.Remove(0,
strPathActualParam.Length + 1)

MyLiteral.Text += "<a href='" & strHref & "'>" & strEspacio &
strArchivo.Remove(0, strPathActualParam.Length + 1) & "<BR>"

Next
 
Thanks alot it works.

I am trying to delete multiple files in a particular directory.
The code will like this
\\\
Dim s As String
For Each s in Directory.GetFiles(...)
system.io.file.delete(s)
Next s
///

is there a method that would allow me delete more than one file at a time.

for instance Delete "*.txt"

ZR
 
Thanks alot
zr

Gustavo De la Espriella said:
The following is a code sample I used:

Dim strArchivo, strHref, strVirtualParam As String

Dim strArrArchivos As String()

strArrArchivos = IO.Directory.GetFiles(strPathActualParam)

For Each strArchivo In strArrArchivos

strHref = strVirtual & "/" & strArchivo.Remove(0,
strPathActualParam.Length + 1)

MyLiteral.Text += "<a href='" & strHref & "'>" & strEspacio &
strArchivo.Remove(0, strPathActualParam.Length + 1) & "<BR>"

Next
 
Back
Top