老师,我用Rename无法重命名,找不到原因,请老师指点一下
Dim ftpx As New FtpClient '定义一个名为:ftpx的ftp客户端
ftpx.Host="xxxxx"
ftpx.Account = "xxx"
ftpx.Password = "xxx"
Dim fxs As List(of String)
fxs = ftpx.GetFileList("\images_1")
Dim f2 As String
Dim f3 As String
For Each fx As String In fxs
f2 = fx.Substring(0,fx.length-4)
f3 = f2 & "-" & _xtyhid & ".png"
Output.Show("f2:" & f2 & " fx:" & fx & " f3" & f3)
If ftpx.FileExists("\images_1\" & fx) Then
If ftpx.Rename("\images_1\" & fx,"\images_1\" & f3) Then
Else
Output.Show("重命名失败")
End If
Else
output.show("没有这个文件")
End If
Next
此主题相关图片如下:重命名失败.png

[此贴子已经被作者于2019/2/26 9:41:26编辑过]