我正在使用Windows ftp.exe运行FTP脚本。直到所有ls -al
命令之后,脚本才会执行put
。但是,目录列表出现在输出中的更早位置。这是为什么?我可以做些什么使输出与脚本顺序相同吗?
open ftpserver.example.com
user acme
********
pwd
cd outbound/work
pwd
binary
put "1568_ACME_20180619065804.csv"
put "1568_ACME_20180619065804.csv.ctl.new"
put "9269_ACME_20180619065804.csv"
put "9269_ACME_20180619065804.csv.ctl.new"
put "9270_ACME_20180619065804.csv"
put "9270_ACME_20180619065804.csv.ctl.new"
put "9272_ACME_20180619065804.csv"
put "9272_ACME_20180619065804.csv.ctl.new"
put "9273_ACME_20180619065804.csv"
put "9273_ACME_20180619065804.csv.ctl.new"
ls -al
bye
==================================
C:> ftp -i -n -s:"C:\Users\acme\AppData\Local\Temp\acme_ftp_script_2018-06-19T07-01-17.tmp"
open ftpserver.example.com
user acme
pwd
257 "/home/ftp/acme" is current directory.
cd outbound/work
pwd
257 "/home/ftp/acme/outbound/work" is current directory.
total 1368
drwxr-xr-x 2 acme ftpgroup 13824 Jun 19 07:10 .
drwxr-xr-x 6 acme ftpgroup 512 May 09 12:36 ..
-rw-r----- 1 acme ftpgroup 12529 Jun 19 07:10 1568_ACME_20180619065804.csv
-rw-r----- 1 acme ftpgroup 0 Jun 19 07:10 1568_ACME_20180619065804.csv.ctl.new
-rw-r----- 1 acme ftpgroup 572681 Jun 19 07:10 9269_ACME_20180619065804.csv
-rw-r----- 1 acme ftpgroup 0 Jun 19 07:10 9269_ACME_20180619065804.csv.ctl.new
-rw-r----- 1 acme ftpgroup 21920 Jun 19 07:10 9270_ACME_20180619065804.csv
-rw-r----- 1 acme ftpgroup 0 Jun 19 07:10 9270_ACME_20180619065804.csv.ctl.new
-rw-r----- 1 acme ftpgroup 34920 Jun 19 07:10 9272_ACME_20180619065804.csv
-rw-r----- 1 acme ftpgroup 0 Jun 19 07:10 9272_ACME_20180619065804.csv.ctl.new
-rw-r----- 1 acme ftpgroup 26973 Jun 19 07:10 9273_ACME_20180619065804.csv
-rw-r----- 1 acme ftpgroup 0 Jun 19 07:10 9273_ACME_20180619065804.csv.ctl.new
binary
put "1568_ACME_20180619065804.csv"
put "1568_ACME_20180619065804.csv.ctl.new"
put "9269_ACME_20180619065804.csv"
put "9269_ACME_20180619065804.csv.ctl.new"
put "9270_ACME_20180619065804.csv"
put "9270_ACME_20180619065804.csv.ctl.new"
put "9272_ACME_20180619065804.csv"
put "9272_ACME_20180619065804.csv.ctl.new"
put "9273_ACME_20180619065804.csv"
put "9273_ACME_20180619065804.csv.ctl.new"
ls -al
bye