我正在运行批处理脚本并尝试使用文件信息创建txt文件。以下是我写的内容。 PROJECT_PATH和REMOTE_FTP_OUTPUT_PATH可以根据脚本中分配给变量的内容而更改。我收到了错误。以下是创建文件的脚本部分:
echo **** PROJECT PATH IS *** %PROJECT_PATH%
echo **** directory location is ***** dir
REM ***** Creat ftp.txt dynamically *********************************
echo open clientftp.accuweather.com > !PROJECT_PATH!\ftp.txt
echo user>> %PROJECT_PATH%\ftp.txt
echo accubot >>%PROJECT_PATH%\ftp.txt
echo HpD7f1sTymq2 >>%PROJECT_PATH%\ftp.txt
echo cd download\mobile_builds\android\v3 >>%PROJECT_PATH%\ftp.txt
echo if not exist %REMOTE_FTP_OUTPUT_PATH% mkdir %REMOTE_FTP_OUTPUT_PATH% >>%PROJECT_PATH%\ftp.txt
echo cd download\mobile_builds\android\v3\%REMOTE_FTP_OUTPUT_PATH% >>%PROJECT_PATH%\ftp.txt
echo put %APK_FULL_OUTPUT% >>%PROJECT_PATH%\ftp.txt
echo quit >>%PROJECT_PATH%\ftp.txt
这是我输出这些行时的输出:
**** PROJECT PATH IS *** temp_builds\6228-10.06
**** directory location is ***** dir
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Error opening script file temp_builds\6228-10.06\ftp.txt.
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.
FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-A] [-x:sendbuffer] [-r:recvbuffer] [-b:asyncbuffers] [-w:windowsize] [host]
-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-x:send sockbuf Overrides the default SO_SNDBUF size of 8192.
-r:recv sockbuf Overrides the default SO_RCVBUF size of 8192.
-b:async count Overrides the default async count of 3
-w:windowsize Overrides the default transfer buffer size of 65535.
host Specifies the host name or IP address of the remote
host to connect to.
Notes:
- mget and mput commands take y/n/q for yes/no/quit.
- Use Control-C to abort commands.