Answers:
您可能最好通过循环目标目录,并将文件复制到每个目录中。 所以有些东西
set sourcefile=%\\server\networkpath\shortcut.lnk%
if exist %sourcefile% (
for /D %%to in (insert your target path pattern here) do (
xcopy %sourcefile% %%to
)
) ELSE (
echo %sourcefile% not found
)
/ D而不是/ R对引用的目录执行操作,而不是通过它们递归。