Batch file 要删除*.vcproj.*的批处理文件,例如code.vcproj.user1,但没有*.vcproj
如何编写批处理文件以仅删除VisualStudioFile(Batch file 要删除*.vcproj.*的批处理文件,例如code.vcproj.user1,但没有*.vcproj,batch-file,vcproj,Batch File,Vcproj,如何编写批处理文件以仅删除VisualStudioFile(*.vcproj.),而不删除VisualStudioProject(*.vcproj)?这可以在cmd中交互运行: for %x in (*.vcproj.*) do if not "%~xx"==".vcproj" del "%x" 如果您想要一个批处理文件,那么您需要 for %%x in (*.vcproj.*) do if not "%%~xx"==".vcproj" del "%%x" 不过,这不会删除像blah.vcp
*.vcproj.
),而不删除VisualStudioProject(*.vcproj
)?这可以在cmd
中交互运行:
for %x in (*.vcproj.*) do if not "%~xx"==".vcproj" del "%x"
如果您想要一个批处理文件,那么您需要
for %%x in (*.vcproj.*) do if not "%%~xx"==".vcproj" del "%%x"
不过,这不会删除像blah.vcproj.vcproj
这样的文件。我不知道你的情况有多像