For information about Globalscape, visit www.globalscape.com. |
Use the RemoteRemove method to delete a remote file or folder. You can specify the file or folder with absolute or relative paths. If the command fails, make sure you have specified the correct path and that you have the appropriate permissions required to delete the item.
Syntax
Object.RemoteRemove(BSTR bstrName)
Parameters
BstrName |
This contains the folder's relative or absolute path. |
Example
Set MySite = CreateObject("CuteFTPPro.TEConnection")
'Initialize all necessary fields for MySite : host name, user, password, etc.
MySite.RemoteRemove "/pub/user1/file.txt"
MySite.RemoteRemove("file.ext") 'removes if exact match
MySite.RemoteRemove("*.obj") 'wild card match with a specific extension
MySite.RemoteRemove("*.aaa" & Chr(10) & "*.bbb" & Chr(10) & "t*") 'various wildcard filters
You can also use wild cards to replace the string value of bstrName. These wild card masks include "*", "?", and '\n" (new line symbol, also known as Chr(10) in VB). |