CMD code to upload file direct into root of FTP site of server
@ echo off
REM ******** this batch file is to upload file
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo lcd D:\Filelocation>>ftpcmd.dat
echo put filename.csv>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat 172.xx.xx.xxx
del ftpcmd.dat
CMD code to upload file direct into sub directory of FTP site of server
@ echo off
REM ******** this batch file is to upload file
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo lcd D:\Filelocation>>ftpcmd.dat
echo put filename.csv .\Subdirectory\ filename.csv >> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat 172.xx.xx.xxx
del ftpcmd.dat
Reference : Rohit Garg (http://mssqlfun.com/)
i read a lot of posts today and yours is the best one i have read ever. i appreciate your attitude.
nice article. i am a huge fan of your work and i’m always coming here to see what’s new. thanks.
i loved reading this article.