{"id":3119,"date":"2019-03-23T21:59:18","date_gmt":"2019-03-23T18:59:18","guid":{"rendered":"https:\/\/sysdba.org\/?p=3119"},"modified":"2019-03-23T21:59:18","modified_gmt":"2019-03-23T18:59:18","slug":"a-batch-file-configuration-for-sending-and-receiving-files-from-an-ftp-server","status":"publish","type":"post","link":"https:\/\/sysdba.org\/en\/a-batch-file-configuration-for-sending-and-receiving-files-from-an-ftp-server\/","title":{"rendered":"A Batch File Configuration For Sending and Receiving Files From an FTP Server"},"content":{"rendered":"<p>Contents of RAR-FTP.bat<\/p>\n<p>[crayon]<br \/>\necho d:dbbackup &#8212; compresses this directory into d:ftp current_date.rar<\/p>\n<p>cd<\/p>\n<p>c:<\/p>\n<p>cd program fileswinrar<\/p>\n<p>rar.exe a -acv d:ftpny-%date%.rar d:dbbackup<\/p>\n<p>echo ftp.txt &#8212; to run the ftp commands<\/p>\n<p>ftp -s:d:ftpftp.txt<\/p>\n<p>[\/crayon]<br \/>\nNote: Add the following to log the batch file operations<\/p>\n<p>[crayon]<br \/>\n@ECHO ON&#8221;@ECHO ON&lt;\/a><\/p>\n<p>call :Logit>>batch_%date%.log 2>&#038;1<\/p>\n<p>exit \/b 0<\/p>\n<p>:Logit<\/p>\n<p>[\/crayon][crayon]<br \/>\nContents of ftp.txt<br \/>\nopen ftpserver_IP_address<\/p>\n<p>ftpusername<\/p>\n<p>password<\/p>\n<p>cd directory<\/p>\n<p>binary<\/p>\n<p>put name_of_file_and_path_of_file_to_be_sent<\/p>\n<p>by<\/p>\n<p>[\/crayon]<br \/>\nTo send a local file to an FTP server use <strong>put<\/strong>, to retrieve a file from an FTP server use <strong>get<\/strong>, as shown in the previous syntax by adding the binary parameter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents of RAR-FTP.bat&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3120,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[366],"tags":[378],"class_list":["post-3119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-guides","tag-ftp-tr"],"_links":{"self":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts\/3119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/comments?post=3119"}],"version-history":[{"count":0,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts\/3119\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/media?parent=3119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/categories?post=3119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/tags?post=3119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}