So I am trying to write a small batch program to copy files over ftp to another device The problem is the devices I am copying to are all different servers, but the information i'm copying stays the same. How can I write this so when I open the batch program, i specify the IP address of the device, and the batch will connect to the server automatically and copy the directories or files i need copied.
Currently it will allow me to input the IP, connect to the server and open a specific file, but every time it tries to connect to copy files it says invalid directory or incorrect server.
:Log
set /p PDTFTP= Enter PDT IP Address:
start "ftp://admin:2p0d0t7@%PDTFTP%/pub/IPSM/fds/log/PDTApplicationLog.txt"
:DB
set /p PDTFTP= Enter PDT IP Address:
xcopy "C:\test.txt" "ftp://admin:2p0d0t7@%PDTFTP%/pub/IPSM/fds/"
Is there a way to do this when the ftp server will be different almost every time its used