I'm coding an application that must run a .bat. I'm trying to use Shell, but nothing seems to happen - no error, etc. Here is a code snippit of a simple test I tried which still did not work.
strFTPCommand = "T:/Table Maintainer/battype.bat"
Call Shell(strFTPCommand,vbMinimizedFocus)
battype.bat contents: type ftpnt.bat > ftpnt.txt
I've tried putting the text directly in the shell call, and I've even tried putting the .bat file contents in the shell call, but nothing seems to happen. The .bat file does work if I execute from a command prompt. Can anyone tell me what I'm doing wrong?
strFTPCommand = "T:/Table Maintainer/battype.bat"
Call Shell(strFTPCommand,vbMinimizedFocus)
battype.bat contents: type ftpnt.bat > ftpnt.txt
I've tried putting the text directly in the shell call, and I've even tried putting the .bat file contents in the shell call, but nothing seems to happen. The .bat file does work if I execute from a command prompt. Can anyone tell me what I'm doing wrong?