hello
i want to copy an ms access database file (.mdb) from a dir to another, simple, but my program throws an excpetion NotSupportedException saying "Given paths format is not supported", how can i copy my file??, heres my code:
[VB]
Dim path As String = ""
target filename will contain todays date
Dim hoy As String = Today.ToString
hoy = hoy.Replace("\", "-")
Dim path1 As String = selPath.SelectedPath + "\udm_" + hoy + "_"
Dim ext As String = ".mdb"
Dim num As Integer = 1
generate target path
path = path1 + num.ToString + ext
check if not exists, else increment the number
While File.Exists(path)
num = num + 1
path = path1 + num.ToString + ext
End While
Dim source As String = Me.path + "db\db.mdb"
exception thrown around the next lines
Dim fs As FileStream = File.Create(path)
fs.Close()
File.Copy(source, path)
[/VB]
thanks for your help
i want to copy an ms access database file (.mdb) from a dir to another, simple, but my program throws an excpetion NotSupportedException saying "Given paths format is not supported", how can i copy my file??, heres my code:
[VB]
Dim path As String = ""
target filename will contain todays date
Dim hoy As String = Today.ToString
hoy = hoy.Replace("\", "-")
Dim path1 As String = selPath.SelectedPath + "\udm_" + hoy + "_"
Dim ext As String = ".mdb"
Dim num As Integer = 1
generate target path
path = path1 + num.ToString + ext
check if not exists, else increment the number
While File.Exists(path)
num = num + 1
path = path1 + num.ToString + ext
End While
Dim source As String = Me.path + "db\db.mdb"
exception thrown around the next lines
Dim fs As FileStream = File.Create(path)
fs.Close()
File.Copy(source, path)
[/VB]
thanks for your help