Re: Skip file on error
if exist y:\file1.xls echo put y:\file1.xls /folder/>> b:\ftpcmd.dat
Etc...
if exist y:\file1.xls echo put y:\file1.xls /folder/>> b:\ftpcmd.dat
File or folder 'y:\file1.xls' does not exist.
System Error. Code: 2.
The system cannot find the file specified
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
Press any key to continue...
@echo off
net use b: "Location 1"
net use x: "Location 2"
net use y: "Location 3"
set m=%DATE:~4,2%
set d=%DATE:~7,2%
set y=%DATE:~-4%
set y2=%DATE:~-2%
echo option batch abort> b:\ftpcmd.dat
echo option confirm off>> b:\ftpcmd.dat
echo open username:password@ftp.address:22>> b:\ftpcmd.dat
echo put y:\file1.xls /folder/>> b:\ftpcmd.dat
echo put x:\file2.xml /folder/>> b:\ftpcmd.dat
echo put x:\file3.xml /folder/>> b:\ftpcmd.dat
echo put x:\file4.xml /folder/>> b:\ftpcmd.dat
echo exit>> b:\ftpcmd.dat
cd c:\program files\winscp\
winscp.com /script=b:\ftpcmd.dat
Rem ********* Delete FTP Script File ***********
del b:\ftpcmd.dat
net use b: /DELETE /y >NUL
net use x: /DELETE /y >NUL
net use y: /DELETE /y >NUL
pause