1、循环遍历当前文件夹下的所有*.dll文件,并打印其绝对路径和相对路径

```
    for /f "tokens=*" %%a in ('dir /s/b/a-d "*.dll"') do (echo %%a "%%~na.dll")
```

VS 2015中 后期生成事件命令行:实现在编译输出的bin文件夹中不存在某一文件时,将3rdwin32lib文件夹中*.dll文件复制到bin文件夹下

```
    for /r $(ProjectDir)3rdwin32lib\ %%a in (*.dll) do (if not exist $(TargetDir)%%~na.dll  copy /y %%a $(TargetDir))
```

VS 2015中 后期生成事件命令行:实现在编译输出的bin文件夹中不存在某一文件时,将3rdwin32lib文件夹中所有文件复制到bin文件夹下

```
    for /r "$(ProjectDir)3rdwin32lib\" %%a in (*) do (if not exist "$(TargetDir)%%~na.*" copy /y %%a "$(TargetDir)")
```

相关文章:

  • 2021-12-30
  • 2021-11-28
  • 2021-10-30
  • 2021-11-26
  • 2021-09-15
  • 2021-07-11
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2021-11-21
  • 2021-08-02
  • 2021-09-15
  • 2021-07-17
  • 2021-06-01
  • 2021-10-03
相关资源
相似解决方案