Blank FTP response!
Posted: 28 Feb 2021 10:02
Hi,
I have a batch file that connects to a ftp server then makes a folder and deletes a (%username%.txt) But when I execute the file it just stays blank with no response but if I let it run it says connection timed out note that the ftp server is working fine and in can connect to it using an online ftp file manager. Sometimes the batch file works but mostly it doesn't am I doing something wrong?
Batch file:
I have a batch file that connects to a ftp server then makes a folder and deletes a (%username%.txt) But when I execute the file it just stays blank with no response but if I let it run it says connection timed out note that the ftp server is working fine and in can connect to it using an online ftp file manager. Sometimes the batch file works but mostly it doesn't am I doing something wrong?
Batch file:
Code: Select all
@echo off
echo user username> ftpcmdq.dat
echo password>> ftpcmdq.dat
echo cd htdocs>> ftpcmdq.dat
echo mkdir %username%>> ftpcmdq.dat
echo cd %username%>> ftpcmdq.dat
echo del %username%.txt>> ftpcmdq.dat
ftp -n -s:ftpcmdq.dat FTP.COM
del ftpcmdq.dat
exit