-1

What I try is to connect to a ftps site on port 55332 in passive mod via a batch script.

After the connect I will stay in the folder /photos/ and automatically download all Folders + files that contains in /photos/

That is what I have but dont know how to set the PORT: 55332 and how I can login via SSL/TLS

set server=xxx
set benutzername=user@xxx.yyy
set passwort=xxxxxx
set lokalerpfad="C:\destination"
set entfernterpfad=/photos/
echo open %server%>ftpcmd.dat
echo %benutzername%>>ftpcmd.dat
echo %passwort%>>ftpcmd.dat
echo bin>>ftpcmd.dat
echo literal PASV>>ftpcmd.dat
echo lcd %lokalerpfad%>>ftpcmd.dat
echo cd %entfernterpfad%>>ftpcmd.dat
echo mput *.*>> ftpcmd.dat
echo !del /q %lokalerpfad%>>ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -i -s:ftpcmd.dat
del ftpcmd.dat

After the ftp site login I would use the script from this thread, more specifically the answers from "Mofi" ... Copy folders and store them in text file to exclude once copied folders on next run

Is that possible what I imagine ? If so help would be nice and thanks in advance.

Community
  • 1
  • 1
BASF
  • 147
  • 1
  • 3
  • 17

1 Answers1

3

You need to use open <servername> <portnumber>:

echo open %server% 55332>ftpcmd.dat

However, assuming you're using the FTP client that ships with Windows, this still will not work given your scenario. ftp.exe does not support FTP over SSL/TLS. It supports plain FTP and that's it. You'll need to use a client such as WinSCP, which is scriptable.

Bacon Bits
  • 30,782
  • 5
  • 59
  • 66