如何在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屋!
查看全文