Hello,
I am evaluating the Scriptftp software, and I am very impressed so far. I have managed to make some scripts to download and delete files from a remote ftp server. However, I now need to do the same but with FTPS. It only works if I point to exact file names for the files I am to download. If I use wildcards it finds no files. What am I doing wrong? I copy/pasted the script below,
I would really appreciate any help you could give!
Alex
I am evaluating the Scriptftp software, and I am very impressed so far. I have managed to make some scripts to download and delete files from a remote ftp server. However, I now need to do the same but with FTPS. It only works if I point to exact file names for the files I am to download. If I use wildcards it finds no files. What am I doing wrong? I copy/pasted the script below,
I would really appreciate any help you could give!
Alex
Code: Select all
# START
SETPROTOCOL(FTPS_EXPLICIT_ENCRYPT_DATA)
$result=OPENHOST("myftp","user","pass")
# If OPENHOST failed stop the script
IF($result!="OK")
STOP
END IF
# Change the current local directory.
$result=LOCALCHDIR("C:\Input")
# If LOCALCHDIR failed stop the script
IF($result!="OK")
STOP
END IF
# Get the remote file listing, store it in $list
$result=GETLIST($list,REMOTE_FILES,"*.*")
# If GETLIST failed stop the script
IF($result!="OK")
STOP
END IF
# For each file in $list...
FOREACH $item IN $list
# Download the file
$result=GETFILE($item)
# If the file has been succesfully downloaded
  # delete the remote copy. If not stop the script.
IF($result=="OK")
DELETEFILE($item)
ELSE
STOP
END IF
END FOREACH
# Close the connection
Thanks for posting your script. It is very helpful.
I think that in this case, the problem comes from the way FTP server reports to ScriptFTP the file listings. Could you create for me a test account in your FTP server to confirm it? you can leave the account folder empty.
I think that in this case, the problem comes from the way FTP server reports to ScriptFTP the file listings. Could you create for me a test account in your FTP server to confirm it? you can leave the account folder empty.
liked Script FTP? Try our other product Email Parser
I sent account details as private PM. Thanks a lot!