私は通常、Ryuが行ったように正確に実行し、WinSCPを使用しますが、さらに一歩進んで、WinSCPのスクリプト機能を使用してよりカスタマイズ可能な展開をマップします。
これについては、完全なセットアップについて詳しく説明しているブログ投稿で詳しく説明しています。
http://www.diaryofaninja.com/blog/2010/09/21/continuous-integration-tip-1-ndash-ftp-deployment
ただし、その基本的な要点は、次のようにスクリプトファイルをWinSCPに渡すことです。
<Target Name="AfterBuild">
<!-- Set the path to your FTP program (winscp) -->
<PropertyGroup>
<PathToWinSCP>"C:\Program Files (x86)\WinSCP\winscp.exe"</PathToWinSCP>
</PropertyGroup>
<!-- Get the date as a string for our log filename-->
<GetDate Format="yyyyMMdd">
<Output PropertyName="DateString" TaskParameter="Date"/>
</GetDate>
<!-- Convert the path to an absolute path -->
<ConvertToAbsolutePath Paths="$(OutputPath)">
<Output TaskParameter="AbsolutePaths" PropertyName="OutputPath"/>
</ConvertToAbsolutePath>
<!-- Fire WinSCP and give it your script files name
as well as passing it the parameter to this build -->
<Exec Command="$(PathToWinSCP) /script=$(OutputPath)Deployment\FtpDeployment.config /parameter $(OutputPath) /log=$(OutputPath)FtpLog-$(DateString).txt" />
</Target>
私のスクリプトは次のようになります。
option batch abort
option confirm off
open ftp://myUsername:myPassword@ftp.myftpsite.com
put %1%\*
rm FtpDeployment.config
exit