0

I have tried to find an answer to my question on StackOverflow but I can only find partial answers and I can't glue them together. :)

I have tried to put a short easy batch together but I can't seem to get it to work quite as I'd like to.

for /f %%i in (hosts.txt) do (

IF not EXIST "\\%%i\c$\installer\install.bat" echo %%i >> c:\e\nofile.txt)

I have a hosts.txt filled with IPs, and I know that on about 50% of the computers that file is on that computer. But all the same all of the IPs turn up in my nofile.txt. What am I missing?

4

1 回答 1

0

如果您在权限和访问权限方面遇到问题,您可以尝试以其他用户身份运行批处理文件。有关更多信息,请参阅 superuser.com 上的此帖子:https ://superuser.com/questions/105913/run-as-for-a-bat-file

于 2013-04-17T12:20:43.137 回答