
Originally Posted by
LaVolpe
I think you should provide more details, otherwise, why not use VB's FileCopy function?
I am using this code to Send Files into a folder "like Upload File control"
1 Code:
Private Sub Command1_Click()
Dim strSourceFileName As String
Dim strDestination As String
On Error GoTo ERR_Handler
'upload file link into database
cdlUpload.DialogTitle = "Upload File"
cdlUpload.Filter = "All Files(*.*)|*.*|Office Document 1997-2000(*.doc)|*.doc|Office Document 2003-2010(*.docx)|*.docx|"
cdlUpload.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
cdlUpload.ShowOpen
strSourceFileName = cdlUpload.FileName
strDestination = "C:\test\" & Mid(strSourceFileName, InStrRev(strSourceFileName, "\") + 1)
If Not Dir(strDestination) = "" Then
If MsgBox("Destination file alreay exists. Would like to override existing?", vbYesNo + vbDefaultButton2, "Confirm File Copy") = vbNo Then
Exit Sub
End If
End If
FileSystem.FileCopy strSourceFileName, strDestination
Exit Sub
ERR_Handler:
MsgBox "An error has occured while copying file. Operation aborted.", vbExclamation, "File Copy Error"
Err.Clear
End Sub
Now i need a way to Save it on another destination "File Download control"
PLease i need Help