批处理文件不通过Access运行 [英] Batch file doesn't run through Access

查看:93
本文介绍了批处理文件不通过Access运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在很多论坛上都看到了这个问题,但到目前为止还没有答案对我有用。


我正在尝试使用一个简单的Shell语句来获取运行.bat文件(也可以作为.cmd文件)的Access,但它不起作用 - 它似乎过快地冲过它。在Access之外手动启动文件可以很好地工作。


基本代码:

Hi everyone,
I see this issue repeated in a lot of forums, but so far no answers have worked for me.

I am trying to get Access to run a .bat file (also works as a .cmd file), using a simple Shell statement, but it isn''t working - it seems to rush through it too fast. Starting the file manually outside of Access works perfectly.

The basic code:

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | 换行 | 行号

推荐答案

尝试 Shell""""""" C:\ Documents&Settings \ mymame \ Myy Documents \CLIENTS - ACTIVE\ftptransfer.cmd"" ",vbNormalFocus


不,没有用 - 问题不在引号中......
No, didn''t work - the issue isn''t in the quotes...


实际上,只是发现了正在发生的事情,并且不确定为什么......


好像蝙蝠实际上是将文件下载到:

C:\Documents and Settings \myname \ My Documents \


I我完全不知道为什么,除非文件路径中的所有空格都让事情变得复杂?


我可以通过移动文件的行修复,但我确实想了解为什么这种情况正在发生(只有当我使用Access运行时才发生这种情况......)
Actually, just found what is happening, and not sure why...

It seems like the bat is actually downloading the file to:
C:\Documents and Settings\myname\My Documents\

I have absolutely no idea why, unless all of the spaces in the file path is making things complicated?

I can fix with a line moving the file, but I sure would like to understand why this is happening (only when I run it with Access this happens....)


这篇关于批处理文件不通过Access运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆