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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running batch files from access

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Is there a way to run batch files invisibly from Access 97 (like using the shell function)?
I'm currently coding a database that needs to work across a firewall, and figured one way to retreive files I need would be to generate an ftp script & run it in a batch file from access.

Cheers,
Douglas JL. If it don't make you laugh, it ain't true.
 
you could try:
Application.echo False

Your code

Application.echo true

do not forget to add an Application.echo true in you err handler as the echo false WILL turn off your app to the user! ;-)

 
You could try using a Windows Script instead of a batch file. These run invisibly to the user, unless you are asking for input.

Put this into a text file

Set ws = CreateObject("WScript.Shell")
ws.Run "%comspec% /c ftp -s:ScriptFile"

Save it as anything you like, so long as it has a .vbs extension.
Change ScriptFile to match your ftp script file.

Now download the code from and you can call your script file using

fhandlefile("FTPScript.vbs",WIN_NORMAL)

I've not tried any of these methods, so you may have to tweak things a bit, but I think the ideas are sound!

HTH

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top