<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Projects Log &#187; wmi</title>
	<atom:link href="http://dev.pulsed.net/wp/?cat=10&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dev.pulsed.net/wp</link>
	<description>projects, diy</description>
	<lastBuildDate>Mon, 25 Jul 2011 11:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to delete file older than X days with Perl and WMI</title>
		<link>http://dev.pulsed.net/wp/?p=8</link>
		<comments>http://dev.pulsed.net/wp/?p=8#comments</comments>
		<pubDate>Sun, 09 Jul 2006 16:23:26 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=8</guid>
		<description><![CDATA[Original idea: Microsoft Scripting Guys (link)
Ok, that&#039;s not that hard, some VBScript to Perl translation, a little modification and that&#039;s all!
I think it should work works remotely too (untested yet) by changing $strComputer with the targeted computer (you need some specific credentials).

my $strComputer = &#034;.&#034;;
&#034;.&#034; means local computer
my $maxage=15;
every file older than 15 days in [...]]]></description>
			<content:encoded><![CDATA[<p>Original idea: Microsoft Scripting Guys (<a target="_blank" href="http://www.microsoft.com/technet/scriptcenter/resources/begin/ss0706.mspx">link</a>)</p>
<p>Ok, that&#039;s not that hard, some VBScript to Perl translation, a little modification and that&#039;s all!</p>
<p><strike>I think</strike> it <strike>should work</strike> works remotely too <strike>(untested yet)</strike> by changing $strComputer with the targeted computer (you need some specific credentials).<br />
<span id="more-8"></span><br />
<em>my $strComputer = &#034;.&#034;;</em><br />
&#034;.&#034; means local computer</p>
<p><em>my $maxage=15;</em><br />
every file older than 15 days in $folder will be deleted</p>
<p>my $folder=&#034;c:\\temp&#034;;<br />
change this with the folder you want to check (<strong>WARNING: be careful</strong> to prevent unwanted file from being deleted, and do not forget to escape \ character everywhere)</p>
<p style="font-family: monospace; color: rgb(255, 0, 0);">[edited: July 10, 2006 &nbsp;11:00 pm =&gt; scan subfolders recursively;<br />uncomment #$_->Delete; after some tests to realy delete files]</p>
<p class="warning">[The requested file <kbd>http://dev.pulsed.net/wp/code/delete.pl</kbd> could not be found]</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
