以下代码有何问题,无论ftp 上有无文件 都提示"此文件不存在!"
If ftp1.FileExists("\whkj\"& j1 &"\"& j2 &"\"& sc &".doc") Then
Dim dlg As New SaveFileDialog
dlg.Filter= "Excel文件|*.xls|Word文件|*.doc"
If dlg.ShowDialog = DialogResult.Ok Then
MessageBox.Show("将文件保存到:" & dlg.FileName,"提示")
End If
If ftp1.Download("\whkj\"& j1 &"\"& j2 &"\"& sc &".doc", dlg.FileName) Then
Dim Proc As New Process
Proc.File = dlg.FileName
Proc.Start()
Else
messagebox.Show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
messagebox.Show("此文件不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
[此贴子已经被作者于2013-10-14 22:37:43编辑过]