I am using the following files to upload a batch of PDF files to my website:
FTP_cmd.txt
user
uploads@mywebsite.com
HM7UKZV
binary
Put SampleFile.pdf
quit
FTP_run.bat
ftp -i -s:FTP_cmd.txt mywebsite.com > FTPlog.log
Pause
When I run the FTP_run.bat file directly (through Windows Explorer), it uploads the files w/o error.
However, when I try to run the FTP_run.bat file with SHELL ("c:\uploads\FTP_run.bat"), it produces the following message in the cmd window: "Error opening script file FTP_cmd.txt. Nothing is written to the log file.
When I use SHELL ("cmd"), it opens the command window.
VBA has a current drive directory and it probably doesn't match the current location of the script file.
Try giving a full path for the script file and see if that resolves it.
Jim.