General discussion

Locked

FTP Bacth procesing

By ndellasala ·
I am trying to utilize a batch file to FTP info. This function has been completed sucessfully. However, I am having trouble getting functionality of error handling with this file. I assume that this is because of the FTP. Is there anyway to get error handling for this process since I want to automate it? I have tried to use the errorlevel it doesn't seem to produce the prper outcome. Any help would be greatly apreciated.

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

FTP Bacth procesing

by Alan Tan In reply to FTP Bacth procesing

Since transfer failure is not a fatal failure for FTP.exe (if you use it interactively, you still have change to correct the failure manually).

But in your situation, (non-interactively), you will have to redirect the output of the ftp to a log file with something like "ftp < input.fil > output.log" and then you need to use find.exe to exame the content of output.log.

You can then exame the errorlevel of the find command to see whether or not there is any errors during the transfer.

The find command returns 0 if string was found in the file, and returns >0 if not found.

Hope help.

Back to Networks Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums