Error Catch in FTP Batch
Posted: 02 Sep 2010 14:17
I have a simple batch file that runs 4 functions and sends some files via FTP to our server
1: collects any of file type *.swy from drop point
2: FTP them to Server
3: Copies files *.swy to backup directory
4: Deletes files *.swy from Drop Point
I need to error catch if the files being FTP’d and not, so that they don’t get deleted from the drop point until ftp’d
Here is my batch file: (this runs fine as is just need to capture should Myserver be down etc)
cd \\Test\db\CFS\WWICFPods
ftp -s:\\Test\db\CFS\WWICFPods\Script.txt
copy \\Test\DB\Cfs\WWICFPods\*.swy \\Test\DB\Cfs\WWICFPods\bak
del \\Test\DB\Cfs\WWICFPods\*.swy
y
======================================================================
Here is the FTP Script.txt file
open
Myserver
MyLogon
MyPassword
CD /cluster/cfs/u/cim3/outray/filedrop
PWD
ascii
prompt
mput \\Test\db\CFS\WWICFPods\*.swy
bye
any help / advise appreciated
1: collects any of file type *.swy from drop point
2: FTP them to Server
3: Copies files *.swy to backup directory
4: Deletes files *.swy from Drop Point
I need to error catch if the files being FTP’d and not, so that they don’t get deleted from the drop point until ftp’d
Here is my batch file: (this runs fine as is just need to capture should Myserver be down etc)
cd \\Test\db\CFS\WWICFPods
ftp -s:\\Test\db\CFS\WWICFPods\Script.txt
copy \\Test\DB\Cfs\WWICFPods\*.swy \\Test\DB\Cfs\WWICFPods\bak
del \\Test\DB\Cfs\WWICFPods\*.swy
y
======================================================================
Here is the FTP Script.txt file
open
Myserver
MyLogon
MyPassword
CD /cluster/cfs/u/cim3/outray/filedrop
PWD
ascii
prompt
mput \\Test\db\CFS\WWICFPods\*.swy
bye
any help / advise appreciated