我有一个批处理脚本,调用另一个这样的;
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界面中的“属性 – >共享 – >高级共享 – >缓存”部分执行相同的操作.