<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to write a batch file for FTP? in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/how-to-write-a-batch-file-for-ftp/m-p/3852657#M7454</link>
    <description>how to write a file that will compress a files in a folder and then will send that compressed file trough FTP software??&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;set /P my_folder="Please enter folder to zip and FTP: "&lt;BR /&gt;&lt;BR /&gt;if exist %my_folder% goto do_zfile&lt;BR /&gt;goto error&lt;BR /&gt;&lt;BR /&gt;:do_zfile&lt;BR /&gt;&lt;BR /&gt;cd %my_folder%&lt;BR /&gt;&lt;BR /&gt;rem .: if your date has '/' in the date, they need to be stripped out.&lt;BR /&gt;for /f "delims='/'" %%i in ('%date%') do&lt;BR /&gt;set my_date=%%i-%%j-%%k&lt;BR /&gt;&lt;BR /&gt;zip_program /switches *.* %my_date%.zip&lt;BR /&gt;&lt;BR /&gt;set /P my_loc="Please enter FTP site: "&lt;BR /&gt;set /P my_id="Please enter your ID: "&lt;BR /&gt;set /P my_pass="Please enter your Password: "&lt;BR /&gt;&lt;BR /&gt;echo open %my_loc% &amp;gt; ftp_conn.txt&lt;BR /&gt;echo user %my_id% %my_pass%&amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo binary &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo hash &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo put %my_date%.zip &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo close &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo quit &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;&lt;BR /&gt;ftp -s:ftp_conn.txt&lt;BR /&gt;&lt;BR /&gt;del ftp_conn.txt&lt;BR /&gt;del %my_date%.zip&lt;BR /&gt;&lt;BR /&gt;goto done&lt;BR /&gt;&lt;BR /&gt;:error&lt;BR /&gt;echo Folder was not found.&lt;BR /&gt;&lt;BR /&gt;:done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;in that when i'm asked for a folder to zip and ftp i don't know what to write... ???</description>
    <pubDate>Tue, 29 Aug 2006 15:05:41 GMT</pubDate>
    <dc:creator>kabucek</dc:creator>
    <dc:date>2006-08-29T15:05:41Z</dc:date>
    <item>
      <title>How to write a batch file for FTP?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-to-write-a-batch-file-for-ftp/m-p/3852657#M7454</link>
      <description>how to write a file that will compress a files in a folder and then will send that compressed file trough FTP software??&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;set /P my_folder="Please enter folder to zip and FTP: "&lt;BR /&gt;&lt;BR /&gt;if exist %my_folder% goto do_zfile&lt;BR /&gt;goto error&lt;BR /&gt;&lt;BR /&gt;:do_zfile&lt;BR /&gt;&lt;BR /&gt;cd %my_folder%&lt;BR /&gt;&lt;BR /&gt;rem .: if your date has '/' in the date, they need to be stripped out.&lt;BR /&gt;for /f "delims='/'" %%i in ('%date%') do&lt;BR /&gt;set my_date=%%i-%%j-%%k&lt;BR /&gt;&lt;BR /&gt;zip_program /switches *.* %my_date%.zip&lt;BR /&gt;&lt;BR /&gt;set /P my_loc="Please enter FTP site: "&lt;BR /&gt;set /P my_id="Please enter your ID: "&lt;BR /&gt;set /P my_pass="Please enter your Password: "&lt;BR /&gt;&lt;BR /&gt;echo open %my_loc% &amp;gt; ftp_conn.txt&lt;BR /&gt;echo user %my_id% %my_pass%&amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo binary &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo hash &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo put %my_date%.zip &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo close &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;echo quit &amp;gt;&amp;gt; ftp_conn.txt&lt;BR /&gt;&lt;BR /&gt;ftp -s:ftp_conn.txt&lt;BR /&gt;&lt;BR /&gt;del ftp_conn.txt&lt;BR /&gt;del %my_date%.zip&lt;BR /&gt;&lt;BR /&gt;goto done&lt;BR /&gt;&lt;BR /&gt;:error&lt;BR /&gt;echo Folder was not found.&lt;BR /&gt;&lt;BR /&gt;:done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;in that when i'm asked for a folder to zip and ftp i don't know what to write... ???</description>
      <pubDate>Tue, 29 Aug 2006 15:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-to-write-a-batch-file-for-ftp/m-p/3852657#M7454</guid>
      <dc:creator>kabucek</dc:creator>
      <dc:date>2006-08-29T15:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a batch file for FTP?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/how-to-write-a-batch-file-for-ftp/m-p/3852658#M7455</link>
      <description>When you're asked which folder, enter What-ever folder it is that you need to zip.&lt;BR /&gt;&lt;BR /&gt;Let's say that you are storing files that you want to FTP in a folder named C:\my_ftp&lt;BR /&gt;&lt;BR /&gt;When prompted, you would enter:  C:\my_ftp&lt;BR /&gt;&lt;BR /&gt;Also, in the script, you will want to replace "zip_program /switches" with the name of your installed zip program, and the appropriate commandline switches you want to use.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Tue, 29 Aug 2006 15:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/how-to-write-a-batch-file-for-ftp/m-p/3852658#M7455</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2006-08-29T15:35:27Z</dc:date>
    </item>
  </channel>
</rss>

