📜  批量复制和替换代码 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:44.354000             🧑  作者: Mango

代码示例4
@echo off
setlocal
rem get the .lnk target directory
for /f "tokens=* usebackq" %%i in (`type "C:\Users\Home\Desktop\Example.lnk" ^| find "\" ^| findstr/b "[a-z][:][\\]"`) do (
  set _targetdir=%%~dpi
  )
rem copy the files
copy /y file1.exe %_targetdir%
copy /y file2.exe %_targetdir%
endlocal