Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch file not working from module 1

Status
Not open for further replies.

lennitw

Programmer
Jan 10, 2006
13
US
I have a batch file that says:

echo on
ftp -s:newservFTP.txt


the newservFTP.txt says:

open [ip removed for security]
loginID
password
cd c:/data/dir1/dir2
binary
put dataXP_backup.mdb
y
close
quit

My problem is that I can double click the .BAT file and it works perfectly, but if I use the following command in an access module:

Shell stpath & "\newservFTP.bat", vbMaximizedFocus

it opens the newservFTP.bat but it doesn’t work. The shell window flashes so quick I cannot see any messages. Any ideas? What I am trying to do is while in access, I am creating a copy of the current DB then trying to FTP that copy to the FTP site.
 
You could put a pause at the end of the bat so the window stays open then see if there are errors.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Thanks. That pause worked. it was hitting the wrong directory if opened via the db. I've hard coded the directory now and it works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top