My desire is to check if the ftp server is ok.
The strategy is to check if there are files in a directory.
and want to accomplish this with the following commands .:
- 1) Run the Win CMD
- 2) ftp ???.???.???.??? (the IP- to the ftp-server
- 3) username
- 4) password
- 5) ls (List the files on the ftp server)
- 6) bye (Shut down the communication with the ftp server)
- 7) exit (Close the CMD window)
Wanted to understand the possibilities, by just running some common local commands,
How to send multiple commands to CMD - on the best way?
(Should probably wait for a response from the ftp server after each input.
Analyze the answers - provide information if e.g. the message "access denied" is displayed.)
In the ahk documentation I found the following example .:
Code: Select all
RunWait A_ComSpec " /c dir C:\ >>C:\DirTest.txt", , "Min"
Run "C:\DirTest.txt"
Run "properties C:\DirTest.txt"
Persistent
Moved the result file (dirTest.txt) from C:\ to another better temp-location.
(and now I don't need to run as administrator )
Each CMD-command produces a response
The program is done!