windows – 批处理文件似乎被缓存

前端之家收集整理的这篇文章主要介绍了windows – 批处理文件似乎被缓存前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个批处理脚本,调用另一个这样的;

call \\myserver\mypath\myfile.bat

这已经有效了大约6年.但是我最近对这行调用的批处理脚本进行了更改.我很快意识到我的更改导致了一个问题,所以我恢复了我的更改.

但是,似乎有些客户仍在调用修改过的脚本.好像他们有一个缓存副本.这可能吗?如果是这样我怎么能清除缓存?

解决方法

是的,如果您尝试通过网络从远程计算机执行批处理文件,则会缓存批处理文件.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365201(v=vs.85).aspx

One type of application that can benefit from local caching is batch files. Command processors read and execute a batch file one line at a time. For each line,the command processor opens the file,searches to the beginning of the line,reads as much as it needs,closes the file,then executes the line. Each line results in a lot of network traffic. Network traffic can be reduced considerably by caching the entire batch file on a client.

我相信你可以使用net share命令的/ cache来禁用缓存:没有参数.

http://technet.microsoft.com/en-us/library/bb490712.aspx

当然,您可以使用Windows界面中的“属性 – >共享 – >高级共享 – >缓存”部分执行相同的操作.

猜你在找的Windows相关文章