|
Re: Batch Script to FTP
Hi Jerry,
I am using the following script but it does not ftp the xml files.
@echo off
SetLocal
:: Set local folder you want to upload here.
Set _lcd=\\lxtrs416.mgroupnet.com\Archives\script\test06\DSR
:: Will use current folder as a Temp folder for the FTP Script
Set _tmpfld=%~dp0
Set _tmpfld=%_tmpfld:~0,-1%
:: Set the Folder on the FTP server that you want to upload to
Set _FTPRoot= /bcmf/SSA/BLUECUBE/intin/DSR
>"%_tmpfld%\ftpcmds.}t{" Echo open 89.108.1.19
>>"%_tmpfld%\ftpcmds.}t{" Echo user
>>"%_tmpfld%\ftpcmds.}t{" Echo user
>>"%_tmpfld%\ftpcmds.}t{" Echo cd "%_FTPRoot%"
>>"%_tmpfld%\ftpcmds.}t{" Echo lcd "%_lcd%"
>>"%_tmpfld%\ftpcmds.}t{" Echo binary
>>"%_tmpfld%\ftpcmds.}t{" Echo mput *.*
>>"%_tmpfld%\ftpcmds.}t{" Echo quit
ftp -v -i -s:"%_tmpfld%\ftpcmds.}t{"
:: Delete the script
Del "%_tmpfld%\ftpcmds.}t{"
EndLocal
Kindly correct if i were wrong anywhere..
|