salve ragazzi,

ho fatto un giro prima del post ma no ho trovato niente..........

devo copiare un file di tipo testo che prendo da una tabella e metterlo in una directory:

ho fatto in questo modo

Sub scaricafoto()
Dim strSQL, foto
strSQL = "select * from articoli"
conn.Open()
Dim Cmdfoto As New OleDbCommand(strSQL, conn)
Dim myfoto As OleDbDataReader = Cmdfoto.ExecuteReader()
While myfoto.Read
If Not myfoto("PFoto") Is System.DBNull.Value Then
If myfoto("PFoto") <> "" Then
foto = myfoto("PFoto")
If Directory.Exists(Application("realPATH") & "Foto\") Then
System.IO.File.Copy(" & foto & ", Application("realPATH") & "Foto\")
End If
End If
End If
End While
myfoto.Close()
conn.Close()
End Sub

cosi facendo non da errore pero non mi copia niente nella directory Foto dove sbaglio grazie???

saluti