{"id":108,"date":"2015-03-15T05:12:51","date_gmt":"2015-03-14T18:12:51","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=108"},"modified":"2022-12-01T19:48:00","modified_gmt":"2022-12-01T08:48:00","slug":"how-to-download-a-file-using-ftp-in-one-line-using-the-windows-command-prompt","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/how-to-download-a-file-using-ftp-in-one-line-using-the-windows-command-prompt\/","title":{"rendered":"How to Download a file using FTP in one line using the Windows Command Prompt"},"content":{"rendered":"<h3>One Liners &#8211; Windows FTP Command Prompt<\/h3>\n<p>There comes a time as an IT Support Professional\/MSP when sometimes you need to ftp from the command prompt and combine the username, password and file to download in one line without having to use a separate text file. \u00a0This is particularly true when performing remote administration tasks remotely where having a separate text file to call the username and password etc&#8230; isn&#8217;t possible. \u00a0Here&#8217;s a simple one liner to accomplish the task.<\/p>\n<p><code>echo open <span style=\"color: #ff0000;\">WEBSITE<\/span> &gt;&gt; ftp &amp;echo user <span style=\"color: #ff0000;\">USERNAME PASSWORD<\/span> &gt;&gt; ftp &amp;echo binary &gt;&gt; ftp &amp;echo get <span style=\"color: #ff0000;\">FILENAMETODOWNLOAD<\/span> &gt;&gt; ftp &amp;echo bye &gt;&gt; ftp &amp;ftp -n -v -s:ftp &amp;del ftp<\/code><\/p>\n<p>Simply replace these details:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">WEBSITE<\/span> &#8211; Enter the FTP address. \u00a0This can be an IP address or an FTP url such as ftp.mysite.com<\/li>\n<li><span style=\"color: #ff0000;\">USERNAME<\/span> &#8211; The username for the FTP site<\/li>\n<li><span style=\"color: #ff0000;\">PASSWORD<\/span> &#8211; The password for the FTP site (omit this if logging in anonymously)<\/li>\n<li><span style=\"color: #ff0000;\">FILENAME TO DOWNLOAD<\/span> &#8211; e.g. myfile.msi<\/li>\n<\/ul>\n<p>If you found this useful please share. \u00a0It may just help one of your colleagues out.<\/p>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>One Liners &#8211; Windows FTP Command Prompt There comes a time as an IT Support Professional\/MSP when sometimes you need to ftp from the command prompt and combine the username, password and file to download in one line without having to use a separate text file. \u00a0This is particularly true when performing remote administration tasks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[9],"article-tag":[200,201,202],"class_list":["post-108","article","type-article","status-publish","format-standard","hentry","article-category-windows-commands","article-tag-download-file-ftp-command-line","article-tag-download-files-from-ftp-using-command-prompt","article-tag-ftp-through-command-prompt"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":17,"sum_votes":76},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=108"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}