<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.antiperfect.org/index.php?action=history&amp;feed=atom&amp;title=Windows%3Aftpbatch</id>
	<title>Windows:ftpbatch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.antiperfect.org/index.php?action=history&amp;feed=atom&amp;title=Windows%3Aftpbatch"/>
	<link rel="alternate" type="text/html" href="https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;action=history"/>
	<updated>2026-10-18T01:15:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=1228&amp;oldid=prev</id>
		<title>Hdridder at 10:35, 22 December 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=1228&amp;oldid=prev"/>
		<updated>2021-12-22T10:35:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:35, 22 December 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:MSwindows]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sample script to SFTP to other systems. Not sure if this must be this complicated but it works.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sample script to SFTP to other systems. Not sure if this must be this complicated but it works.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-i3a:diff:1.41:old-663:rev-1228:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Hdridder</name></author>
	</entry>
	<entry>
		<id>https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=663&amp;oldid=prev</id>
		<title>Hdridder at 10:02, 6 December 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=663&amp;oldid=prev"/>
		<updated>2019-12-06T10:02:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:02, 6 December 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l72&quot;&gt;Line 72:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;REM #######################################################################&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;DEL /Q %LOCAL_DIR%\*.*&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;REM #                                                                     #&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;REM # You shouldn&#039;t need to change anything below this comment            #&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;REM #                                                                     #&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;REM #######################################################################&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;DEL /Q %LOCAL_DIR%\*.*&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;(for /f &amp;quot;usebackq delims=&amp;quot; %%A in (&amp;quot;%CURRENT_FILE%&amp;quot;) do call echo.%%A)&amp;gt;%TEMP_FILE%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;(for /f &amp;quot;usebackq delims=&amp;quot; %%A in (&amp;quot;%CURRENT_FILE%&amp;quot;) do call echo.%%A)&amp;gt;%TEMP_FILE%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l96&quot;&gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 90:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;REM type gzip can only compress 1 file, tar first.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;REM type gzip can only compress 1 file, tar first.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;%ZBIN% -y a -ttar %LOCAL_DIR%\&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2G_topo_&lt;/del&gt;%TIME_STAMP%.tar  %LOCAL_DIR%\*.*&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;%ZBIN% -y a -ttar %LOCAL_DIR%\&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;name&amp;gt;_&lt;/ins&gt;%TIME_STAMP%.tar  %LOCAL_DIR%\*.*&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;%ZBIN% -y a -tgzip %LOCAL_DIR%\&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2G_topo_&lt;/del&gt;%TIME_STAMP%.tgz  %LOCAL_DIR%\&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2G_topo_&lt;/del&gt;%TIME_STAMP%.tar&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;%ZBIN% -y a -tgzip %LOCAL_DIR%\&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;name&amp;gt;_&lt;/ins&gt;%TIME_STAMP%.tgz  %LOCAL_DIR%\&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;name&amp;gt;_&lt;/ins&gt;%TIME_STAMP%.tar&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;DEL /Q %LOCAL_DIR%\&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2G_topo_&lt;/del&gt;%TIME_STAMP%.tar&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;DEL /Q %LOCAL_DIR%\&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;name&amp;gt;_&lt;/ins&gt;%TIME_STAMP%.tar&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;REM remove the temporary generated SFTP command file again...&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;REM remove the temporary generated SFTP command file again...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 111:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;close&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;close&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;bye&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;bye&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-i3a:diff:1.41:old-662:rev-663:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Hdridder</name></author>
	</entry>
	<entry>
		<id>https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=662&amp;oldid=prev</id>
		<title>Hdridder: Created page with &quot;Sample script to SFTP to other systems. Not sure if this must be this complicated but it works.  &lt;syntaxhighlight lang=bat&gt; ;@ECHO OFF ;SETLOCAL ; ;REM #######################...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.antiperfect.org/index.php?title=Windows:ftpbatch&amp;diff=662&amp;oldid=prev"/>
		<updated>2019-12-06T09:20:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sample script to SFTP to other systems. Not sure if this must be this complicated but it works.  &amp;lt;syntaxhighlight lang=bat&amp;gt; ;@ECHO OFF ;SETLOCAL ; ;REM #######################...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sample script to SFTP to other systems. Not sure if this must be this complicated but it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bat&amp;gt;&lt;br /&gt;
;@ECHO OFF&lt;br /&gt;
;SETLOCAL&lt;br /&gt;
;&lt;br /&gt;
;REM ##############################################################################&lt;br /&gt;
;REM #&lt;br /&gt;
;REM # Operating System: Windows 2008&lt;br /&gt;
;REM # Purpose: &lt;br /&gt;
;REM #&lt;br /&gt;
;REM # to ensure that this script can be successfully invoked through the scheduler make sure:&lt;br /&gt;
;REM #   - there is no relative path within this script, all paths in this script should be absolute paths.&lt;br /&gt;
;REM #   - no mapped drives are used (e. g. X-drive), they may not be reached through the scheduler.&lt;br /&gt;
;REM #&lt;br /&gt;
;REM # URL&amp;#039;s to code examples:&lt;br /&gt;
;REM # http://www.dostips.com/DtTipsFtpBatchScript.php   # Batch + FTP scripting with variables using ; lines&lt;br /&gt;
;REM # http://www.gutefrage.net/frage/ms-dos-aktuelles-datum-als-variable-im-format-yyyy-mm-tt&lt;br /&gt;
;REM # http://www.robvanderwoude.com/unixports.php#TEE&lt;br /&gt;
;REM # http://stackoverflow.com/questions/8701871/calling-sftp-process-from-vba-code   # CMD /c ECHO y &lt;br /&gt;
;REM #&lt;br /&gt;
;REM #&lt;br /&gt;
;REM #&lt;br /&gt;
;REM ##############################################################################&lt;br /&gt;
;REM &lt;br /&gt;
;REM System         Contact Person&lt;br /&gt;
;REM &lt;br /&gt;
;REM  Ver  Update        Who    	Modification&lt;br /&gt;
;REM -------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;SET BASE_PATH=&amp;lt;Directorypath&amp;gt;&lt;br /&gt;
;SET SFTP_EXE=&amp;quot;C:\PuTTY\psftp.exe&amp;quot;&lt;br /&gt;
;SET ZBIN=&amp;quot;c:\Program Files\7-Zip\7z.exe&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
;SET SCRIPT_NAME=%~n0&lt;br /&gt;
;SET CURRENT_FILE=%~f0&lt;br /&gt;
;SET YYYY=%date:~-4,4%&lt;br /&gt;
;SET   DD=%date:~-7,2%&lt;br /&gt;
;SET   MM=%date:~-10,2%&lt;br /&gt;
;SET  DAY=%date:~0,3%&lt;br /&gt;
;SET CURRENT_DATE=%DATE%&lt;br /&gt;
;SET CURRENT_TIME=%TIME%&lt;br /&gt;
;SET TIME_STAMP=%YYYY%%MM%%DD%&lt;br /&gt;
;&lt;br /&gt;
;SET SCRIPT_PATH=%BASEPATH%&amp;lt;morePath&amp;gt;&lt;br /&gt;
;SET LOGFILE=%BASEPATH%&amp;lt;morePath&amp;gt;&lt;br /&gt;
;SET TEMP_DIR=%BASEPATH%\temp&lt;br /&gt;
;SET TEMP_FILE=%TEMP_DIR%\%SCRIPT_NAME%.temp&lt;br /&gt;
;REM SET PRIVATE_KEY=&amp;lt;privatekeylocation&amp;gt;&lt;br /&gt;
;SET PRIVATE_KEY=&amp;lt;privatekeylocation&amp;gt;&lt;br /&gt;
;REM change to local directory of the script&lt;br /&gt;
;REM is needed if script is started e. g. from within Notepad++&lt;br /&gt;
;CD c:\tmp&lt;br /&gt;
;&lt;br /&gt;
;REM SET SFTP_SERVER=&amp;lt;IPaddress&amp;gt;&lt;br /&gt;
;SET SFTP_SERVER=&amp;lt;IPaddress&amp;gt;&lt;br /&gt;
;SET USERNAME=&amp;lt;username&amp;gt;&lt;br /&gt;
;SET LOCAL_DIR=%BASEPATH%&amp;lt;morePath&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
;SET REMOTE_DIR=&amp;lt;directorypath&amp;gt;&lt;br /&gt;
;SET SEARCH_STRING=&amp;quot;*%DD%%MM%%YYYY%*&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
;REM check if directory %TEMP_DIR% exists and create it if it not exists...&lt;br /&gt;
;IF EXIST %TEMP_DIR% ( echo. ) ELSE ( mkdir %TEMP_DIR% &amp;amp;&amp;amp; ECHO %TEMP_DIR% created)&lt;br /&gt;
;&lt;br /&gt;
;ECHO ##### File Transfer Started at %CURRENT_DATE% %CURRENT_TIME% ##### | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;&lt;br /&gt;
;REM if no files are found in local directory start file transfer, otherwise skip file transfer...&lt;br /&gt;
;IF EXIST %LOCAL_DIR%\%SEARCH_STRING% (&lt;br /&gt;
;ECHO &amp;quot;%SCRIPT_NAME% : Skipping file transfer, because files &amp;#039;%SEARCH_STRING%&amp;#039; already exist in local directory...&amp;quot; | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;GOTO :EOF&lt;br /&gt;
;)&lt;br /&gt;
;&lt;br /&gt;
;REM #######################################################################&lt;br /&gt;
;REM #                                                                     #&lt;br /&gt;
;REM # You shouldn&amp;#039;t need to change anything below this comment            #&lt;br /&gt;
;REM #                                                                     #&lt;br /&gt;
;REM #######################################################################&lt;br /&gt;
;&lt;br /&gt;
;DEL /Q %LOCAL_DIR%\*.*&lt;br /&gt;
&lt;br /&gt;
;(for /f &amp;quot;usebackq delims=&amp;quot; %%A in (&amp;quot;%CURRENT_FILE%&amp;quot;) do call echo.%%A)&amp;gt;%TEMP_FILE%&lt;br /&gt;
;&lt;br /&gt;
;ECHO using filter: %SEARCH_STRING% | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;&lt;br /&gt;
;REM calls the SFTP command of PuTTY using the generated temporary file as command input...&lt;br /&gt;
;REM psftp -h  &lt;br /&gt;
;REM   -b file   use specified batchfile&lt;br /&gt;
;REM   -pw passw login with specified password&lt;br /&gt;
;REM   -1 -2     force use of particular SSH protocol version&lt;br /&gt;
;REM   -C        enable compression&lt;br /&gt;
;REM   -i key    private key file for authentication&lt;br /&gt;
;&lt;br /&gt;
;REM %SFTP_EXE% -b %TEMP_FILE% -2 -C %USERNAME%@%SFTP_SERVER% -pw %PASSWORD% | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;CMD /c ECHO y | %SFTP_EXE% -b %TEMP_FILE% -2 -C -i %PRIVATE_KEY% %USERNAME%@%SFTP_SERVER% | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;&lt;br /&gt;
;REM type gzip can only compress 1 file, tar first.&lt;br /&gt;
;%ZBIN% -y a -ttar %LOCAL_DIR%\2G_topo_%TIME_STAMP%.tar  %LOCAL_DIR%\*.*&lt;br /&gt;
;%ZBIN% -y a -tgzip %LOCAL_DIR%\2G_topo_%TIME_STAMP%.tgz  %LOCAL_DIR%\2G_topo_%TIME_STAMP%.tar&lt;br /&gt;
;DEL /Q %LOCAL_DIR%\2G_topo_%TIME_STAMP%.tar&lt;br /&gt;
;&lt;br /&gt;
;REM remove the temporary generated SFTP command file again...&lt;br /&gt;
;REM DEL &amp;quot;%TEMP_FILE%&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
;SET CURRENT_DATE=%DATE%&lt;br /&gt;
;SET CURRENT_TIME=%TIME%&lt;br /&gt;
;ECHO ##### File Transfer Finished at %CURRENT_DATE% %CURRENT_TIME% ##### | %SCRIPT_PATH%\tee.bat -a %LOGFILE%&lt;br /&gt;
;&lt;br /&gt;
;REM PAUSE --&amp;gt; do not use this command if script is called by scheduler!&lt;br /&gt;
;GOTO:EOF&lt;br /&gt;
;REM #######################################################################&lt;br /&gt;
;ENDLOCAL&lt;br /&gt;
&lt;br /&gt;
lcd %LOCAL_DIR%&lt;br /&gt;
cd %REMOTE_DIR%&lt;br /&gt;
mget %SEARCH_STRING%&lt;br /&gt;
close&lt;br /&gt;
bye&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hdridder</name></author>
	</entry>
</feed>