【发布时间】:2019-05-15 13:40:03
【问题描述】:
我正在将一项任务从手动转移到自动
我很清楚在执行此操作时您无法检查错误,但这不是我的目标。
我的代码按预期工作,但我缺少...一些东西
我需要让用户知道,在我将文件放入 FTP 位置后,文件已上传,他们不再需要等待文件。
到目前为止,我已经通过抱怨用户来做到这一点,一旦命令运行,他们就会被告知它有效
@echo off
REM Generates the script
echo open 000.000.000.000> temp.txt
echo username>> temp.txt
echo password>> temp.txt
echo lcd "N:\line\line\line">> temp.txt
echo put file.txt>> temp.txt
echo quit>> temp.txt
REM Open FTP and run the script above
ftp -s:temp.txt
REM Remove the temp file
del temp.txt
REM Display confirmation
msg %username% "File sent to FTP"
非常感谢任何帮助。如果需要,我会添加更多信息
【问题讨论】:
标签: batch-file cmd ftp