I connected to my Adrive.com account to download the backup file. I do not know the version of Linux that is installed. I tried to get a version with these commands:
ftp> uname -r
Invalid command.
ftp> cat /etc/*-release
Invalid command.
ftp> lsb_release -a
Invalid command.
ftp> cat /proc/version
Invalid command.
ftp> uname -a
Invalid command.
As you can see, none of them worked.
Here is my script that I am trying to run:
ECHO open ftp:
echo cd backup>>FTPSND.TXT
echo cd companyfiles>>FTPSND.TXT
echo mkdir %3>>FTPSND.TXT
echo cd %3>>FTPSND.TXT
echo option transfer binary>>FTPSND.TXT
ECHO send %1>>FTPSND.TXT
ECHO close>>FTPSND.TXT
ECHO exit>>FTPSND.TXT
winscp.com /script=ftpsnd.txt >>%2
And the error that occurs on mkdir:
Error creating folder 'BEL'.
File or directory already exists.
(A)bort, (R)etry, (S)kip: Abort
My main problem is that if the directory does not exist, I need to create it, otherwise I will skip this step and proceed to send.
Any ideas how I get around this?
EDIT
In response to Hackoo:
I did not mention that this batch file is being called from another batch file near the end. When I used your code, I do not upload the file and the log shows:
ftp> Open ftp.adrive.com
Connected to ftp.adrive.com.
220 Username is your email address used for web interface
User (ftp.adrive.com:(none)):
331 Username OK, please send password.
230 Welcome xxxxx
ftp> prompt n
Interactive mode Off .
ftp> bin
200 TYPE changed to I.
ftp> MkDir /backup/companyfiles/IFC
550 File or directory already exists.
ftp> cd /backup/companyfiles/IFC
250 Changed directory OK.
ftp> mput D:\SSSAVES\sssbackup\TMPDIR\IFC_20160705141154.ZIP
200 PORT command OK.
150 Opening BINARY mode data connection for file IFC_20160705141154.ZIP.
. 2 , . 70 , , .
№ 2
Adrive, , ftp mput . , .
№ 3
mput put, 1 . .