【发布时间】:2018-02-11 19:11:23
【问题描述】:
我正在尝试从 FTP 服务器自动备份到本地外部硬盘驱动器。当从外部硬盘驱动器目标文件夹手动运行时,以下脚本适用于 WinSCP:
E:\Backups\FTP>"C:\Program Files (x86)\WinSCP\WinSCP.com" /ini=nul /script="E:\Backups\ftptpp.txt"
我几乎没有在 Windows 中安排任务的经验,我使用的是 Windows 8.1。按照 WinSCP 指南,到目前为止我已经写了这个:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\Program Files (x86)\WinSCP\WinSCP.log" /ini=nul /script="E:\Backups\ftptpp.txt"
但是,在我手动运行的原始脚本中,我从目标文件夹运行它。如何在任务调度器中指定目标文件夹所在的位置(E:\Backups\FTP)?
作为参考,ftptpp.txt 脚本如下所示:
# Connect
open ftp://username:password@ftp.example.org/
# Change remote directory
cd /
# Download file to the local directory
synchronize local
# Disconnect
close
# Exit WinSCP
exit
【问题讨论】:
标签: ftp scheduled-tasks winscp taskscheduler