Write the following code into a batch file and double click to send data. Please change the below highlighted variables value to see your expected output.
@echo off
del /Q DosFtpFile.ftp
echo FTP_USER_NAME> DosFtpFile.ftp
echo FTP_PASSWORD>> DosFtpFile.ftp
FOR %%i IN (*.txt) DO echo put %%i>> DosFtpFile.ftp
echo bye>> DosFtpFile.ftp
ping -n 3 127.0.0.1 >NULL
ftp -s:DosFtpFile.ftp FTP_MACHINE_NAME/IP
The above code will help you to send automatically all *.txt file into a specific FTP server.
Note that, you can change *.txt or *.csv or as you have required.
@echo off
del /Q DosFtpFile.ftp
echo FTP_USER_NAME> DosFtpFile.ftp
echo FTP_PASSWORD>> DosFtpFile.ftp
FOR %%i IN (*.txt) DO echo put %%i>> DosFtpFile.ftp
echo bye>> DosFtpFile.ftp
ping -n 3 127.0.0.1 >NULL
ftp -s:DosFtpFile.ftp FTP_MACHINE_NAME/IP
The above code will help you to send automatically all *.txt file into a specific FTP server.
Note that, you can change *.txt or *.csv or as you have required.
No comments:
Post a Comment