1
不得不問題導致無法找到它:刪除目錄
如何檢查,如果目錄中包含任何如文件夾或文件,無論...還是空
如何刪除空目錄?
如何刪除目錄即使有內容。
例如創建目錄我使用以下功能:
Public Sub CreateDirectory(path As String)
If session IsNot Nothing Then
session.CreateDirectory(path)
End If
End Sub
日誌文件requested in comment:
> 2015-10-05 11:11:13.010 MLST /\MainFolder 2014\ANIA
< 2015-10-05 11:11:13.104 550 MLST command failed: No such file or directory.
. 2015-10-05 11:11:13.104 Could not retrieve file information
< 2015-10-05 11:11:13.104 Script: Can't get attributes of file '\MainFolder 2014\ANIA'.
< 2015-10-05 11:11:13.104 Script: Could not retrieve file information
< 2015-10-05 11:11:13.104 MLST command failed: No such file or directory.
. 2015-10-05 11:11:13.104 Script: Failed
這一個不工作:sessi on.RemoteFiles(session.EscapeFileMask(path))。這不是刪除文件夾本身,而只是在這個文件夾中。 – Arie
有時也不會刪除文件。 – Arie
你正在使用的'path'的確切值是多少? –