<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>spechal.com &#187; FTP</title>
	<atom:link href="http://spechal.com/tag/ftp/feed/" rel="self" type="application/rss+xml" />
	<link>http://spechal.com</link>
	<description>[spesh-uhl]</description>
	<lastBuildDate>Mon, 23 Apr 2012 01:30:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Windows Batch FTP Routine</title>
		<link>http://spechal.com/2009/11/20/windows-batch-ftp-routine/</link>
		<comments>http://spechal.com/2009/11/20/windows-batch-ftp-routine/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 05:10:37 +0000</pubDate>
		<dc:creator>Spechal</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://spechal.com/?p=72</guid>
		<description><![CDATA[Here is some example code to connect to an FTP server and run the commands that follow. @echo on %windir%\system32\ftp.exe -n -s:"%~f0" server.com goto done user myusername mypassword cd /home/directory/public_html ls -al quit :done pause The key to this working &#8230; <a href="http://spechal.com/2009/11/20/windows-batch-ftp-routine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is some example code to connect to an FTP server and run the commands that follow.</p>
<pre class="vb">@echo on

%windir%\system32\ftp.exe -n -s:"%~f0" server.com
goto done
user myusername
mypassword
cd /home/directory/public_html
ls -al
quit
:done
pause
</pre>
<p>The key to this working are the following:</p>
<p>The -n switch allows you to not be prompted for a username upon connection.<br />
The -s:&#8221;%~f0&#8243; says to use the rest of the file as the commands to execute<br />
The goto command is not a valid FTP command, so the FTP server ignores it.</p>
<p>So you have the script using the Windows FTP utility to connect to a server and a routine running your commands. You can even extend off of this.</p>
]]></content:encoded>
			<wfw:commentRss>http://spechal.com/2009/11/20/windows-batch-ftp-routine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

