从磁盘中删除不在Visual Studio项目中的文件 [英] Delete files from disk that aren't in a Visual Studio project

查看:131
本文介绍了从磁盘中删除不在Visual Studio项目中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以想到一种方法(也许使用PowerShell脚本或类似工具)来查找文件夹结构中磁盘上但项目文件中未包含的* .cs文件吗?

Can anyone think of a way (perhaps using a PowerShell script or similar) where I can look for *.cs files that are on disk in the folder structure, but aren't included in a project file?

随着Subversion等的合并,随着时间的推移,这种情况逐渐发生.基本上,我正在寻找一种方法来清理自己. :)

This has come about gradually over time with merging in Subversion etc. I'm looking for a way to clean up after myself, basically. :)

推荐答案

您的所有.cs文件都会在项目文件中提及,对吧?刮除XML,列出文件,然后在整个系统上进行搜索.有效,但效率低下.

All your .cs files will be mentioned in the project file, right? Scrape the XML, list the files and then do a search on the whole system. Works, but is inefficient.

这篇关于从磁盘中删除不在Visual Studio项目中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆