Object.RemoteCommand(BSTR bstrCmd)
Set MySite = CreateObject("CuteFTPPro.TEConnection")
‘Initialize all necessary fields for MySite : host name, user, password, etc.
MySite.RemoteCommand "PWD" ‘sends a print working directory command
Note:
If you include the word "LIST", or "RETR", or "STOR" in bstrCmd then the Transfer Engine will open the data connection, perform the operation (to the buffer) and then discard it. You should use the GetList, Download or Upload methods to accomplish these tasks.
You can concatenate strings to perform custom commands. For example, if you wanted to do use CHMOD on a file, you could do as shown in the example below:
Set MySite = CreateObject("CuteFTPPro.TEConnection")
‘Initialize all necessary fields for MySite : host name, user, password, etc.
strMODE = "777" ‘full permissions
strFile = InputBox("Type in the file name below ", "CHMOD Dialog", "cftppro10.log") ‘an input dialog with some default content
strvar = "SITE CHMOD " & strMODE & " " & strFile ‘concatenate the values
MySite.RemoteCommand strvar 'send the command