<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Powershell-script to find files not having specified text</title>
	<atom:link href="http://mats.gardstad.se/matscodemix/2008/12/17/powershell-script-to-find-files-not-having-specified-text/feed/" rel="self" type="application/rss+xml" />
	<link>http://mats.gardstad.se/matscodemix/2008/12/17/powershell-script-to-find-files-not-having-specified-text/</link>
	<description>A little c#, a litte .NET and throw in some c++ and you get a nice Spaghetti</description>
	<pubDate>Wed, 23 May 2012 14:14:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: matsgf</title>
		<link>http://mats.gardstad.se/matscodemix/2008/12/17/powershell-script-to-find-files-not-having-specified-text/comment-page-1/#comment-110</link>
		<dc:creator>matsgf</dc:creator>
		<pubDate>Tue, 03 Jan 2012 10:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=3#comment-110</guid>
		<description>Thanbks for your visit, i will correct the script code to "select-string" instead.</description>
		<content:encoded><![CDATA[<p>Thanbks for your visit, i will correct the script code to &#8220;select-string&#8221; instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent THAVONEKHAM</title>
		<link>http://mats.gardstad.se/matscodemix/2008/12/17/powershell-script-to-find-files-not-having-specified-text/comment-page-1/#comment-109</link>
		<dc:creator>Vincent THAVONEKHAM</dc:creator>
		<pubDate>Tue, 03 Jan 2012 09:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=3#comment-109</guid>
		<description>OK, I got is: "ss" stands for "select-string".

It works fine, thanks.

Here is an example to check if StyleCop has been activated in ALL projects:

function ssHasNot(
    [string] $Path="*.csproj"
    ,[string] $pattern="StyleCop.target"
)
{
    $has=[string]@(get-childitem $path &#124; select-string $pattern &#124; foreach {$_.Path})
    get-childitem $path&#124; where {$has.Contains($_.FullName) -eq $false}
}

ssHasNot



Vincent THAVONEKHAM</description>
		<content:encoded><![CDATA[<p>OK, I got is: &#8220;ss&#8221; stands for &#8220;select-string&#8221;.</p>
<p>It works fine, thanks.</p>
<p>Here is an example to check if StyleCop has been activated in ALL projects:</p>
<p>function ssHasNot(<br />
    [string] $Path=&#8221;*.csproj&#8221;<br />
    ,[string] $pattern=&#8221;StyleCop.target&#8221;<br />
)<br />
{<br />
    $has=[string]@(get-childitem $path | select-string $pattern | foreach {$_.Path})<br />
    get-childitem $path| where {$has.Contains($_.FullName) -eq $false}<br />
}</p>
<p>ssHasNot</p>
<p>Vincent THAVONEKHAM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent THAVONEKHAM</title>
		<link>http://mats.gardstad.se/matscodemix/2008/12/17/powershell-script-to-find-files-not-having-specified-text/comment-page-1/#comment-108</link>
		<dc:creator>Vincent THAVONEKHAM</dc:creator>
		<pubDate>Tue, 03 Jan 2012 09:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://mats.gardstad.se/matscodemix/?p=3#comment-108</guid>
		<description>Hi, thanks for that.
I wanted to know, what is "ss" ?? in ss $pattern ??

Indeed, I got the following error:
"The term 'ss' is not recognized as the name of a cmdlet, function, script file, or operable program."

Regards,

Vincent THAVONEKHAM</description>
		<content:encoded><![CDATA[<p>Hi, thanks for that.<br />
I wanted to know, what is &#8220;ss&#8221; ?? in ss $pattern ??</p>
<p>Indeed, I got the following error:<br />
&#8220;The term &#8217;ss&#8217; is not recognized as the name of a cmdlet, function, script file, or operable program.&#8221;</p>
<p>Regards,</p>
<p>Vincent THAVONEKHAM</p>
]]></content:encoded>
	</item>
</channel>
</rss>

