帮助!尝试使用变量重命名文件时,我收到File Not Found
错误。变量是string
。
我可以查看变量,它是那里的确切文件名,但是当我运行代码时,它说“找不到”!
Dim filePath, fileName, absPath, newPath As String
filePath = "P:\Automated\"
fileName = MySite.GetResult
absPath = filePath & fileName
newPath = "P:\Automated\NEW.csv"
'The following is a rename from CuteFTP Pro COM Object:
'(Getting the same result from this and the below "Name".
'MySite.LocalRename "P:\Automated\" & fileName, "P:\Automated\NEW.csv"
Name absPath As newPath
答案 0 :(得分:0)
我对VBA一无所知,但普通语言需要转义'\'。 所以试试“P:\\ Automated \\”等等。