BOAC
If you use %1 %2 %3 etc as variables it will substitute when running with parameter 1 .... xxx
e.g.
The contents of Dataload.bat could be
Code:
@echo off cls bcp test..test in %1 -S. -U%2 -P%3 -c -t,
If I then called it with the following command line:-
Code:
Dataload.bat loadfile.csv myuser mypassword
%1 would be replaced with the filename
%2 with myuser
%3 with mypassword
Put parameters in quotes (") if they contain spaces.
It would also be good to call MS Access AFTER download is complete. I cannot find a batch file command to wait for execution.
A batch file will wait until the ftp application is complete if it is a console application. So it sounds like you are executing a forms application which will not perform the same way.
You can either switch to using a proper command line ftp application (NT has its own type ftp /? in a command prompt) or you could pause your batch file using the PAUSE keyword which will ask the user to "Press any key to continue ..." and will then continue.