<?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: Implement an auto update system</title>
	<atom:link href="http://www.rolandli.com/2009/04/19/implement-an-auto-update-system/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system</link>
	<description>Designer + Coder</description>
	<lastBuildDate>Sun, 22 Aug 2010 16:59:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: rolandli</title>
		<link>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system/comment-page-1#comment-4751</link>
		<dc:creator>rolandli</dc:creator>
		<pubDate>Wed, 29 Apr 2009 17:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.rolandli.com/?p=396#comment-4751</guid>
		<description>Hi Kaleem,

I&#039;m not too familiar with C#, but I will try my best to answer your question.

Files which are in use cannot be deleted, but they can be renamed. In the example above, there is a vector &lt;em&gt;filelist&lt;/em&gt; that stores a list of files to be updated. So just loop through it to and rename all the existing files in it.

As far as I know, there is a function in C# is good for this purpose: &lt;em&gt;System.IO.File.Move(@&quot;C:\From.txt&quot;, @&quot;C:\TO.txt&quot;);&lt;/em&gt;. Use it to add &quot;.old&quot; to all the existing files.

After that, you can copy the newly downloaded files into the working folder since there is no file overwriting issue. 

In order for the new files to take effect, the program MUST be restarted. And in your main loop, before anything else take place, check if the working folder has any &quot;.old&quot; file, if so, delete them all.

I hope that answers your question.</description>
		<content:encoded><![CDATA[<p>Hi Kaleem,</p>
<p>I&#8217;m not too familiar with C#, but I will try my best to answer your question.</p>
<p>Files which are in use cannot be deleted, but they can be renamed. In the example above, there is a vector <em>filelist</em> that stores a list of files to be updated. So just loop through it to and rename all the existing files in it.</p>
<p>As far as I know, there is a function in C# is good for this purpose: <em>System.IO.File.Move(@&#8221;C:\From.txt&#8221;, @&#8221;C:\TO.txt&#8221;);</em>. Use it to add &#8220;.old&#8221; to all the existing files.</p>
<p>After that, you can copy the newly downloaded files into the working folder since there is no file overwriting issue. </p>
<p>In order for the new files to take effect, the program MUST be restarted. And in your main loop, before anything else take place, check if the working folder has any &#8220;.old&#8221; file, if so, delete them all.</p>
<p>I hope that answers your question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaleem ullah khan</title>
		<link>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system/comment-page-1#comment-4750</link>
		<dc:creator>kaleem ullah khan</dc:creator>
		<pubDate>Wed, 29 Apr 2009 10:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rolandli.com/?p=396#comment-4750</guid>
		<description>Hi Roland, I like the article, I have a small concern i am a C # developer, so i was looking at the code not very througly, I could not understand a part ,
 I understood that we created a temp folder and downloaded latest files in them, we also copied all current files  to a new folder for backup how can i rename the current files to .old extension these files are already in use and also how i am going to tell my icon for instance to load from temp folder where new files are present.

thanks</description>
		<content:encoded><![CDATA[<p>Hi Roland, I like the article, I have a small concern i am a C # developer, so i was looking at the code not very througly, I could not understand a part ,<br />
 I understood that we created a temp folder and downloaded latest files in them, we also copied all current files  to a new folder for backup how can i rename the current files to .old extension these files are already in use and also how i am going to tell my icon for instance to load from temp folder where new files are present.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
