I am trying to create a batch file that will upload a single file by FTP every time it is ran. Everything looks good in windows cmd. I get past the authentication of user name and password and after PUT it says 200 PORT command successful but the next line is 550 xmltest.xml: Permission denied. When I run thru the steps manually in the cmd prompt I can upload it just fine and it takes without this error which leads me to believe it is within the batch file.

this is the bat file...

@echo off
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
echo bin /httpdocs/FOLDER/tools/locations/>> ftpcmd.dat
echo put C:\_ARTWORK\xmltest.xml>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat XXX.XXX.XX.XXX
del ftpcmd.dat

If anyone knows what I am doing wrong here please let me know. thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.