如何在 Visual Studio 预构建事件命令行中删除文件 [英] How to delete files in Visual Studio Pre-build event command line
本文介绍了如何在 Visual Studio 预构建事件命令行中删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在构建项目之前,我试图在 Visual Studio 中删除我的 $(TargetDir)
中的文件.
I am trying to delete files in my $(TargetDir)
within visual studio before building a project.
你如何格式化命令行来解决我在下面遇到的这个问题?
How do you have to format command line to get around this problem I am getting below?
推荐答案
尝试
cd $(TargetDir)
del *.tif
正如 jvenema 所指出的,您的 $(TargetDir) 正在扩展到一个包含文件夹名称中的空格的路径,这会破坏删除命令.
As jvenema pointed out, your $(TargetDir) is expanding into a path containing spaces in the folder names which is breaking the delete command.
这篇关于如何在 Visual Studio 预构建事件命令行中删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文