<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Hello PowerShell world!</title>
	<atom:link href="http://andrwwatt.wordpress.com/2006/05/12/hello-world/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrwwatt.wordpress.com/2006/05/12/hello-world/</link>
	<description>Pondering the power of PowerShell</description>
	<lastBuildDate>Wed, 22 Nov 2006 18:23:57 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: BGates</title>
		<link>http://andrwwatt.wordpress.com/2006/05/12/hello-world/#comment-56</link>
		<dc:creator>BGates</dc:creator>
		<pubDate>Wed, 22 Nov 2006 18:23:57 +0000</pubDate>
		<guid isPermaLink="false">#comment-56</guid>
		<description>In a search and replace substring script involving multiple files, I have concurrency issues.  Here&#039;s the script:

(get-childitem . -recurse -force -include &quot;Root&quot;) &#124;  
   foreach-object -process 
     {get-content $_ &#124;
      select-string -pattern 2001 &#124;
      foreach-object {$_ -replace &quot;2001&quot;, &quot;2003&quot;} &#124;
      set-content $_
     }

The intent is to search the folders recursively to
find files named &quot;Root&quot;.  For each found file,
get the single line out and replace the occurence
of the string &quot;2001&quot; with &quot;2003&quot;.
Finally, write out the content back to the same file.

An example (Example 3) of a similar operation is given
in &quot;get-help set-content -detailed&quot;.

Instead, I get &quot;... because it is being used by another process ...&quot;.

Is there a better way?</description>
		<content:encoded><![CDATA[<p>In a search and replace substring script involving multiple files, I have concurrency issues.  Here&#8217;s the script:</p>
<p>(get-childitem . -recurse -force -include &#8220;Root&#8221;) |<br />
   foreach-object -process<br />
     {get-content $_ |<br />
      select-string -pattern 2001 |<br />
      foreach-object {$_ -replace &#8220;2001&#8243;, &#8220;2003&#8243;} |<br />
      set-content $_<br />
     }</p>
<p>The intent is to search the folders recursively to<br />
find files named &#8220;Root&#8221;.  For each found file,<br />
get the single line out and replace the occurence<br />
of the string &#8220;2001&#8243; with &#8220;2003&#8243;.<br />
Finally, write out the content back to the same file.</p>
<p>An example (Example 3) of a similar operation is given<br />
in &#8220;get-help set-content -detailed&#8221;.</p>
<p>Instead, I get &#8220;&#8230; because it is being used by another process &#8230;&#8221;.</p>
<p>Is there a better way?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeffrey Snover</title>
		<link>http://andrwwatt.wordpress.com/2006/05/12/hello-world/#comment-2</link>
		<dc:creator>Jeffrey Snover</dc:creator>
		<pubDate>Fri, 12 May 2006 12:52:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-2</guid>
		<description>I&#039;m looking forward to hearing about your experiences with PowerShell.  

Cheers!
Jeffrey Snover</description>
		<content:encoded><![CDATA[<p>I&#8217;m looking forward to hearing about your experiences with PowerShell.  </p>
<p>Cheers!<br />
Jeffrey Snover</p>
]]></content:encoded>
	</item>
</channel>
</rss>
