Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个 bat 文件,首先将搜索可执行文件“Text.exe”的路径。然后我想从我创建的路径中复制一个 log.log 文件,在 thr 文件夹 LOg 中,并将该文件复制到服务器 \server1\logFiles
你能帮我举个例子吗?
c:\searchlocation您要搜索的路径在哪里:
c:\searchlocation
FOR /F "tokens=*" %%F IN ('dir /b /s C:\searchlocation\Text.exe') do ( copy "%%~pFLog.log" "\server1\logFiles" )