One line command to check file in ftp site is exist or not or filesize.

C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head
Last-Modified: Thu, 11 Dec 2008 15:57:58 GMT
Content-Length: 111054
Accept-ranges: bytes



C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head
curl: (19) Given file does not exist


Remember , If you want to output the screen into a file for other reading check purpose by other application .
please alway reference

output.log 2>&1

C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head > output.log 2>&1
C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head > output.log 2>&1

留言

這個網誌中的熱門文章

隱藏檔案 及 將已註冊完的軟體取消註冊

ARP

notepad++ for procomm plus