詳細情報:バックアップのコピーを作成しますbatchscriptのhttp://www.nsftools.com/tips/MSFTP.htm 例、:
@echo off
:: Set filename and path
:: %date:.=-% mean replace dots '.' to '-' in the variable's value (31.07.2011)
:: More info: set /?
set "fileName=backup-%date:.=-%.bak"
:: There mustn't be slash in end. "C:\Backups\" is wrong, "C:\Backups" is right
set "filePath=C:\Backups"
set "ftpFilePath=somepath"
:: there must be ftp's IP & port
set "ftpIP=127.0.0.1"
set "ftpPort=21"
:: replace with your own username & password
set "username=username"
set "password=password"
:: Write commands in file
:: Open server
echo o %ftpIP% %ftpPort%>ftpcmds
:: Say your name & password. If you have no password - just do not change these lines
echo %username%>>ftpcmds
echo %password%>>ftpcmds
:: We send binary data, yep?
echo binary>>ftpcmds
:: Change ftp path
echo cd %ftpFilePath%>>ftpcmds
:: Change local path
echo lcd "%filePath%">>ftpcmds
:: Yeah, we can send file
echo send %fileName%>>ftpcmds
:: Bye = disconnect + quit
echo bye>>ftpcmds
:: Run ftp-client. More info: ftp --help
:: Delete '>nul' if you want see output of ftp
ftp -s:ftpcmds>nul
exit /b
あなたは、元のファイルを削除するコマンドを追加することができますしたい場合は(それを置きます
del /s/q %filePath%\%fileName%>nul
http://www.nsftools.com/tips/MSFTP.htm#delete返信用 –