Batch command to check if FTP connection is successful -


i writing batch command send data via ftp. before sending actual data need find if ftp server active/running. how check in batch command?

the server responds "220 server ready" message when connected.

do this:

yourftpcommand | find /i /v "220 server ready" && goto :servernotready 

explanation:

  1. pipe output of ftp command find
  2. do case insensitive (/i) search output not contain (/v) string "220 server ready"
  3. go someplace if such string found (&&)

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -