<?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>ShinyLight Development &#187; Systems</title>
	<atom:link href="http://www.shinylight.com/category/systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shinylight.com</link>
	<description>Web Development and Other Goodness in the World of a Software Engineer.</description>
	<lastBuildDate>Mon, 07 Jun 2010 03:02:19 +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>Testing Database Import Scripts with Snapshots</title>
		<link>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/</link>
		<comments>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/#comments</comments>
		<pubDate>Tue, 04 May 2010 23:39:32 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=962</guid>
		<description><![CDATA[Can&#8217;t stress enough how handy database snapshots (compatible only in Enterprise and Developer editions of SQL Server 2005+) come in when testing bulk imports, data scrubbing, or any sort of data / schema modification script. In nearly no time, I can create a snapshot (via shortcut snippet), run my script &#8211; don&#8217;t like the results? [...]]]></description>
			<content:encoded><![CDATA[<p>Can&#8217;t stress enough how handy database snapshots (compatible only in Enterprise and Developer editions of SQL Server 2005+) come in when testing bulk imports, data scrubbing, or any sort of data / schema modification script. In nearly no time, I can create a snapshot (via shortcut snippet), run my script &#8211; don&#8217;t like the results? My script crapped out the data? I can run an instant undo by recovering from the snapshot, which works pretty fast. If I want to create another snapshot, I usually tend to overwrite the snapshot I created, and then create it again.</p>
<p>It&#8217;s so handy that I have a snippet for it:<br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/05/snippet.png"  /></p>
<p>Anywhoot, here&#8217;s how you create a snapshot:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- CREATING A SNAPSHOT</span>
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase_snap <span style="color: #0000FF;">ON</span>         <span style="color: #008080;">-- Name of new snapshot</span>
<span style="color: #808080;">&#40;</span>
  NAME <span style="color: #808080;">=</span> yourdb_data,                        <span style="color: #008080;">-- Logical filename of source db you want to snapshot</span>
  FILENAME <span style="color: #808080;">=</span> <span style="color: #FF0000;">'c:<span style="color: #000099; font-weight: bold;">\Y</span>ourDatabase_data_1800.ss'</span>  <span style="color: #008080;">-- Sparse file to create</span>
<span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">AS</span> SNAPSHOT <span style="color: #0000FF;">OF</span> YourDatabase;                 <span style="color: #008080;">-- Source db name</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">-- RECOVERING FROM A SNAPSHOT</span>
<span style="color: #0000FF;">USE</span> master;
<span style="color: #0000FF;">RESTORE</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase                    <span style="color: #008080;">-- Source db name where the data resided</span>
<span style="color: #0000FF;">FROM</span> DATABASE_SNAPSHOT <span style="color: #808080;">=</span> <span style="color: #FF0000;">'YourDatabase_snap'</span>;    <span style="color: #008080;">-- Snapshot db name</span></pre></td></tr></table></div>

<p>Deleting a snapshot is just like dropping a database.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">DATABASE</span> YourDatabase_Snap</pre></td></tr></table></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;submitHeadline=Testing+Database+Import+Scripts+with+Snapshots&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;bm_description=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;T=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;title=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Testing+Database+Import+Scripts+with+Snapshots+@+http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/&amp;t=Testing+Database+Import+Scripts+with+Snapshots" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/05/05/testing-database-import-scripts-with-snapshots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast Delete</title>
		<link>http://www.shinylight.com/2010/04/09/fast-delete/</link>
		<comments>http://www.shinylight.com/2010/04/09/fast-delete/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 01:23:11 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=925</guid>
		<description><![CDATA[I needed to delete 30,000 files that took about 60 GB. I know traditionally it takes forever to delete it in Windows. Even using the &#8220;del&#8221; command in the console, it&#8217;s always been slow for me. Enter Robocopy. I never gave it a chance until today. The way it can delete is by syncing directory [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to delete 30,000 files that took about 60 GB. I know traditionally it takes forever to delete it in Windows. Even using the &#8220;del&#8221; command in the console, it&#8217;s always been slow for me. Enter <strong><a href="http://en.wikipedia.org/wiki/Robocopy">Robocopy</a></strong>. I never gave it a chance until today. The way it can delete is by syncing directory against an empty one which was just what I needed. It was able to do it in about 50 seconds. Awesome. </p>
<p>You&#8217;ll have to download Robocopy as part of the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&#038;displaylang=en">Windows Server 2003 Resource Kit Tools</a>.</p>
<p>What I used to delete this big directory:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">robocopy /MIR c:\empty-directory c:\my-files-to-delete</pre></div></div>

<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/04/09/fast-delete/&amp;submitHeadline=Fast+Delete&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/04/09/fast-delete/&amp;title=Fast+Delete" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/04/09/fast-delete/&amp;title=Fast+Delete" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/04/09/fast-delete/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/04/09/fast-delete/&amp;title=Fast+Delete" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/04/09/fast-delete/&amp;bm_description=Fast+Delete" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/04/09/fast-delete/&amp;T=Fast+Delete" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/04/09/fast-delete/&amp;title=Fast+Delete" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/04/09/fast-delete/&amp;title=Fast+Delete" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/04/09/fast-delete/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/04/09/fast-delete/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Fast+Delete+@+http://www.shinylight.com/2010/04/09/fast-delete/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/04/09/fast-delete/&amp;t=Fast+Delete" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/04/09/fast-delete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Winrar from the Command Line</title>
		<link>http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/</link>
		<comments>http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 20:24:47 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=907</guid>
		<description><![CDATA[Winrar is a great tool used for compressing files. It also has a command line tool called &#8220;rar.exe&#8221; to compress files, in case you want to batch it up. Here&#8217;s an example of the most common switches I use.

&#34;C:\Program Files\WinRAR\rar.exe&#34; a -m5 -r -ep1 &#34;C:\temp\Work\Upgrades\2010-02-06\111.rar&#34; &#34;C:\temp\Work\Upgrades\2010-02-06\Post-Upgrade\&#34;

First path is the location of the rar file to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rarlab.com/">Winrar</a> is a great tool used for compressing files. It also has a command line tool called &#8220;rar.exe&#8221; to compress files, in case you want to batch it up. Here&#8217;s an example of the most common switches I use.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\P</span>rogram Files<span style="color: #000099; font-weight: bold;">\W</span>inRAR<span style="color: #000099; font-weight: bold;">\r</span>ar.exe&quot;</span> a <span style="color: #339933;">-</span>m5 <span style="color: #339933;">-</span>r <span style="color: #339933;">-</span>ep1 <span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\t</span>emp<span style="color: #000099; font-weight: bold;">\W</span>ork<span style="color: #000099; font-weight: bold;">\U</span>pgrades<span style="color: #000099; font-weight: bold;">\2</span>010-02-06<span style="color: #000099; font-weight: bold;">\1</span>11.rar&quot;</span> <span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\t</span>emp<span style="color: #000099; font-weight: bold;">\W</span>ork<span style="color: #000099; font-weight: bold;">\U</span>pgrades<span style="color: #000099; font-weight: bold;">\2</span>010-02-06<span style="color: #000099; font-weight: bold;">\P</span>ost-Upgrade<span style="color: #000099; font-weight: bold;">\&quot;</span></span></pre></div></div>

<p>First path is the location of the rar file to create. The second path is either the location of the file(s) or directory to compress.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">options used
&nbsp;
  -ep1  Exclude base directory from names
  a     Add files to archive
  -r    Recurse subdirectories (will compress entire directories)
  -m5   Set compression level to maximum</pre></div></div>

<p>You can even assign a password to it using the -p switch</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;submitHeadline=Using+Winrar+from+the+Command+Line&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;title=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;title=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;title=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;bm_description=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;T=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;title=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;title=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Using+Winrar+from+the+Command+Line+@+http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/&amp;t=Using+Winrar+from+the+Command+Line" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/03/29/using-winrar-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search As You Type</title>
		<link>http://www.shinylight.com/2010/02/14/search-as-you-type/</link>
		<comments>http://www.shinylight.com/2010/02/14/search-as-you-type/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 21:55:42 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=852</guid>
		<description><![CDATA[Just upgraded recently from WindowsXP to Windows7. One feature I used a lot forever (since Win95 I think), was the search as you type (this is what I call it anyways). It&#8217;s when you have an Explorer window open (let&#8217;s say in this case c:\ ) and you type &#8220;W&#8221; &#8211; it moves the cursor [...]]]></description>
			<content:encoded><![CDATA[<p>Just upgraded recently from WindowsXP to Windows7. One feature I used a lot forever (since Win95 I think), was the search as you type (this is what I call it anyways). It&#8217;s when you have an Explorer window open (let&#8217;s say in this case c:\ ) and you type &#8220;W&#8221; &#8211; it moves the cursor to directory that starts with the letter &#8220;W.&#8221; You can type &#8220;Win&#8221; quickly and it will go to the first directory that starts with those keywords in case you have directories that start with &#8220;Win.&#8221;</p>
<p>So after I configured the UI settings on Win7 to the way I saw fit, I realized that this feature was gone. It would automatically start searching for text in all files recursively &#8211; very annoying. I asked how to turn this feature off in many forums and do what I wanted to do and no one knew. </p>
<p>I finally figured it out. It was a setting that I turned on accidentally. (D&#8217;oh!)</p>
<p>Explorer Window -> Organize -> Folder Options -> View Tab -> When typing<br />
into list view -> Select the typed item in the view</p>
<p>That wasn&#8217;t checked. I suppose I did it instinctively without thinking. In WindowsXP, the area is used to trigger Advanced File Sharing, and I guess I didn&#8217;t realize this in Windows7. Also, I don&#8217;t think in XP this is an option you can control because it just works.</p>
<p>Windows7 Options</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/02/1.png" /></p>
<p>WindowsXP Options</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/02/foptions.png"  /></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;submitHeadline=Search+As+You+Type&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;title=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;title=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/14/search-as-you-type/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;title=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;bm_description=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;T=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;title=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;title=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/14/search-as-you-type/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/14/search-as-you-type/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Search+As+You+Type+@+http://www.shinylight.com/2010/02/14/search-as-you-type/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/14/search-as-you-type/&amp;t=Search+As+You+Type" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/14/search-as-you-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reasons I&#8217;m Not a Fan of Google Chrome OS</title>
		<link>http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/</link>
		<comments>http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 21:34:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Systems]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=849</guid>
		<description><![CDATA[I&#8217;m assuming you&#8217;ve seen what Chrome OS can do. Just Google &#8220;Chrome OS,&#8221; because it&#8217;s everywhere.
I would give Chrome OS an 8.0 / 10.0 for computer beginners, like the grandmas of the world. It&#8217;s gets a 2.0 / 10.0 for techies. Why? Three reasons. 

Needs too many resources for what it delivers.
Cannot run executables, not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m assuming you&#8217;ve seen what Chrome OS can do. Just Google &#8220;Chrome OS,&#8221; because it&#8217;s everywhere.</p>
<p>I would give Chrome OS an 8.0 / 10.0 for computer beginners, like the grandmas of the world. It&#8217;s gets a 2.0 / 10.0 for techies. Why? Three reasons. </p>
<ul>
<li>Needs too many resources for what it delivers.</li>
<li>Cannot run executables, not even virtually/sandboxed.</li>
<li>Needs the cloud for storage.</li>
</ul>
<p>Kind of annoying that I can&#8217;t just run it on any old laptop / netbook. System requirements are too demanding for what it promises and it seems it&#8217;s needed just to have that 2-4 second boot-up time, which honestly it doesn&#8217;t mean much to me. There&#8217;s never a time where I&#8217;m in such a hurry that I need my computer that fast, because I&#8217;m either doing something else, or I just use my phone. </p>
<p>I some people really care about boot-up time? I&#8217;d rather wait 10 more seconds and have the ability to run .EXE files and have it run on old PC&#8217;s. For a minimalist device, I have my table PC or iPhone already that can do all that stuff, and I don&#8217;t have to worry about malware on the iPhone. I don&#8217;t think techies have to worry to much about malware since they&#8217;re careful about getting them in the first place and have good Anti-viruses. </p>
<p>Lastly, an Internet connection is not ubiquitous yet. I&#8217;m on the subway a lot where there&#8217;s no WIFI and sometimes I travel to places without an Internet connection. I want to be able to at least read my latest documents without connecting to the cloud. </p>
<p>The OS is still in the works, so I suppose maybe they&#8217;ll address some of these features in the future. </p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;submitHeadline=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;title=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;title=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;title=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;bm_description=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;T=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;title=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;title=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS+@+http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/&amp;t=Reasons+I%26%238217%3Bm+Not+a+Fan+of+Google+Chrome+OS" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/14/reasons-im-not-a-fan-of-google-chrome-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Console2 Alternative to CMD</title>
		<link>http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/</link>
		<comments>http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 05:00:30 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[AutoHotKey]]></category>
		<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=826</guid>
		<description><![CDATA[You know what, I tried PowerShell and I guess I never got used to it. I&#8217;ve been using DOS for the longest time that I prefer its simplicity when navigating through files. As far as scripting with it &#8211; forget it &#8211; it&#8217;s very cryptic and limiting, not to mention awkward.   That&#8217;s why [...]]]></description>
			<content:encoded><![CDATA[<p>You know what, I tried PowerShell and I guess I never got used to it. I&#8217;ve been using DOS for the longest time that I prefer its simplicity when navigating through files. As far as scripting with it &#8211; forget it &#8211; it&#8217;s very cryptic and limiting, not to mention awkward.   That&#8217;s why for scripting now I&#8217;m using Python. Nonetheless though, I sometimes need a playing field to run the scripts for, or running console utilities. That&#8217;s where Console2 comes in.</p>
<p>Console2 is a great tool that provides tabbing (you can tab through multiple consoles) and several ways to customize the UI. Here&#8217;s an example: </p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/02/console2.jpg" /></p>
<p><br /><br />
I prefer this configuration:</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/02/console2-1.gif" /></p>
<p><br /></p>
<h3>How I Have It Setup</h3>
<p><br /><br />
Download Console2:</p>
<ul>
<li><a href="http://sourceforge.net/projects/console/">32-bit Version</a></li>
<li><a href="http://www.rblasch.org/projects/console/">64-bit Version</a></li>
</ul>
<p>I have the Console2 open up when I hit CTR+\ via <a href="http://www.autohotkey.com/">AutoHotkey</a>. Here&#8217;s the snippet for this to happen in AutoHotkey. I have this run when Window starts (it must stay in memory).</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">^</span>\<span style="color: #339933;">::</span><span style="color: #006600;">Run</span> C<span style="color: #339933;">:</span><span style="color: #0000ff;">\dan</span><span style="color: #339933;">-</span><span style="color: #000066;">local</span><span style="color: #0000ff;">\dos</span><span style="color: #339933;">-</span>win<span style="color: #0000ff;">\Console</span><span style="color: #339933;">.</span>exe</pre></div></div>

<p>Change the CMD prompt by creating a PROMPT system variable:<br /><br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/02/prompt.png" /><br />
<br /><br />
<a href="http://www.shinylight.com/wp-content/uploads/2010/02/console.xml">Download the Console2 Config File</a></p>
<h3>Other Tips</h3>
<p><br /><strong>Autocomplete</strong><br />
  Good tip about command console = CTRL+I<br />
  can select files in the current directory, kinda like autofill-in<br />
  you can also put in parts of the file and it autoputs it for you</p>
<p><strong>Rename tab</strong><br />
  CTRL+R</p>
<p><strong>New Tab with default transparency  </strong><br />
  CTRL+F1</p>
<p><strong>New Tab with lighter transparency</strong><br />
  CTRL+F2</p>
<p><strong>Switch to NEXT adjacent tab</strong><br />
  CTRL+TAB</p>
<p><strong>Switch to Previous adjacent tab</strong><br />
  CTRL+SHIFT+TAB</p>
<p><strong>CTRL+[NUMBER]</strong><br />
  Goes to the tab instance. To make it easier, it&#8217;s best if you rename your tabs,</p>
<p>    [INSTANCE NAME].[NAME OF TAB]  </p>
<p>  So for example, </p>
<p>    1.Batch File<br />
    2.wget list<br />
    3.ftp the files</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;submitHeadline=Console2+Alternative+to+CMD&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;title=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;title=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;title=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;bm_description=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;T=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;title=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;title=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Console2+Alternative+to+CMD+@+http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/&amp;t=Console2+Alternative+to+CMD" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/13/console2-alternative-to-cmd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Base Tag Not Supported In Hotmail</title>
		<link>http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/</link>
		<comments>http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 00:32:46 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=819</guid>
		<description><![CDATA[It&#8217;s interesting how the &#60;base&#62; works in various clients. I thought all major web clients would support it, but apparently it is not the case. 
Let&#8217;s look at how some email clients process this tag:
Yahoo.com! Web Mail
Base tags are modified by their mail server and relative URLs are changed to absolute. So it works.
Gmail Web [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s interesting how the <a href="http://w3schools.com/tags/tag_base.asp">&lt;base&gt;</a> works in various clients. I thought all major web clients would support it, but apparently it is not the case. </p>
<p>Let&#8217;s look at how some email clients process this tag:</p>
<h3>Yahoo.com! Web Mail</h3>
<p>Base tags are modified by their mail server and relative URLs are changed to absolute. So it works.</p>
<h3>Gmail Web Mail</h3>
<p>Base tags are modified by their mail server and relative URLs are changed to absolute. So it works.</p>
<h3>Gmail Account via Thunderbird</h3>
<p>Base tags are shown and its functionality is intact. URLs remain relative. So it works.</p>
<h3>iMS Account via Outlook 2007</h3>
<p>Base tags are shown and its functionality is intact. URLs remain relative. So it works. <a href="http://www.coolfusion.com/products/ims/">More info on iMS. </a></p>
<h3>ShinyLight Account via iPhone </h3>
<p>Can&#8217;t see the HTML, but all URLs worked.</p>
<h3>Hotmail</h3>
<p>Unfortunately, this is the ugly duckling. Hotmail servers remove the base tag and leave your relative links as relative. Big FAIL.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;submitHeadline=Base+Tag+Not+Supported+In+Hotmail&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;title=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;title=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;title=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;bm_description=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;T=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;title=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;title=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Base+Tag+Not+Supported+In+Hotmail+@+http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/&amp;t=Base+Tag+Not+Supported+In+Hotmail" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/11/base-tag-not-supported-in-hotmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Latest File</title>
		<link>http://www.shinylight.com/2010/02/04/get-latest-file/</link>
		<comments>http://www.shinylight.com/2010/02/04/get-latest-file/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:37:31 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=794</guid>
		<description><![CDATA[In my last post, I made a quick script that checks for the date. It was very limiting, since it used the dir command. This one uses several date/time Python modules and is more capable.

import os, os.path, stat, time
from datetime import date, timedelta, datetime
&#160;
# Reference
# http://docs.python.org/library/datetime.html
# http://docs.python.org/library/time.html
&#160;
def getFileDate&#40; filenamePath &#41;:    
&#160;
  [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.shinylight.com/2010/01/30/compress-and-move-log-files/">my last post</a>, I made a quick script that checks for the date. It was very limiting, since it used the dir command. This one uses several date/time Python modules and is more capable.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>, <span style="color: #dc143c;">stat</span>, <span style="color: #dc143c;">time</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">datetime</span> <span style="color: #ff7700;font-weight:bold;">import</span> date, timedelta, <span style="color: #dc143c;">datetime</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Reference</span>
<span style="color: #808080; font-style: italic;"># http://docs.python.org/library/datetime.html</span>
<span style="color: #808080; font-style: italic;"># http://docs.python.org/library/time.html</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> getFileDate<span style="color: black;">&#40;</span> filenamePath <span style="color: black;">&#41;</span>:    
&nbsp;
  used = <span style="color: #dc143c;">os</span>.<span style="color: #dc143c;">stat</span><span style="color: black;">&#40;</span> filenamePath <span style="color: black;">&#41;</span>.<span style="color: black;">st_mtime</span>      
  year, day, month, hour, minute, second = <span style="color: #dc143c;">time</span>.<span style="color: black;">localtime</span><span style="color: black;">&#40;</span>used<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>:<span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>
  objDateTime = <span style="color: #dc143c;">datetime</span><span style="color: black;">&#40;</span>year, day, month, hour, minute, second<span style="color: black;">&#41;</span>
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">return</span> objDateTime
&nbsp;
  <span style="color: #808080; font-style: italic;"># Ways to reference this DateTime Object</span>
  <span style="color: #808080; font-style: italic;"># objDateTime.strftime(&quot;%Y-%m-%d %I:%M %p&quot;)</span>
  <span style="color: #808080; font-style: italic;"># objDateTime.year</span>
  <span style="color: #808080; font-style: italic;"># objDateTime.month</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> isDaysOldFromNow<span style="color: black;">&#40;</span> filenamepath, days <span style="color: black;">&#41;</span>:
&nbsp;
  <span style="color: #808080; font-style: italic;"># Checks how old a file is. Is it older than &quot;days&quot; [variable] days?</span>
  inTimeRange = <span style="color: #008000;">False</span>  
  timeDeltaDiff = <span style="color: black;">&#40;</span> <span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>-getFileDate<span style="color: black;">&#40;</span> filenamepath <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>.<span style="color: black;">days</span>
&nbsp;
  <span style="color: #808080; font-style: italic;"># Check if the file's date is days old or less:</span>
  <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span> timeDeltaDiff <span style="color: #66cc66;">&gt;</span>= days <span style="color: black;">&#41;</span>:
    inTimeRange = <span style="color: #008000;">True</span>  
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">return</span> inTimeRange
&nbsp;
fname = <span style="color: #483d8b;">&quot;C:/temp/decision2.pdf&quot;</span>  
&nbsp;
<span style="color: #808080; font-style: italic;"># Set this variable to check if the file is this days old</span>
howOld = <span style="color: #ff4500;">3</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span> isDaysOldFromNow<span style="color: black;">&#40;</span> fname, howOld <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>:
  <span style="color: #ff7700;font-weight:bold;">print</span> fname, <span style="color: #483d8b;">&quot;is more than&quot;</span>, howOld, <span style="color: #483d8b;">&quot;days old&quot;</span>
<span style="color: #ff7700;font-weight:bold;">else</span>:
  <span style="color: #ff7700;font-weight:bold;">print</span> fname, <span style="color: #483d8b;">&quot;is NOT more than&quot;</span>, howOld, <span style="color: #483d8b;">&quot;days old&quot;</span></pre></div></div>

<p>Output:<br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/02/walk1.gif" alt="" title="walk1" width="546" height="387" class="alignnone size-full wp-image-795" /></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;submitHeadline=Get+Latest+File&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;title=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;title=Get+Latest+File" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/02/04/get-latest-file/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;title=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;bm_description=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;T=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;title=Get+Latest+File" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;title=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/02/04/get-latest-file/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/02/04/get-latest-file/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Get+Latest+File+@+http://www.shinylight.com/2010/02/04/get-latest-file/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/02/04/get-latest-file/&amp;t=Get+Latest+File" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/02/04/get-latest-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compress and Move Log Files</title>
		<link>http://www.shinylight.com/2010/01/30/compress-and-move-log-files/</link>
		<comments>http://www.shinylight.com/2010/01/30/compress-and-move-log-files/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 23:51:10 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=788</guid>
		<description><![CDATA[Sometimes log files bog a system down. For one of our servers, I made this little Python script that compresses (via WinRAR) the log files in a directory, and then moves them to a backup location. The only little catch is that I wanted to leave the latest log files for in that directory. Log [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes log files bog a system down. For one of our servers, I made this little Python script that compresses (via WinRAR) the log files in a directory, and then moves them to a backup location. The only little catch is that I wanted to leave the latest log files for in that directory. Log files are created daily, so the the latest log files have a datestamp of today. Here&#8217;s how I did it.</p>
<p>First Create the Python Script:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
&nbsp;
dateStamp  = <span style="color: #dc143c;">datetime</span>.<span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%Y-%m-%d&quot;</span><span style="color: black;">&#41;</span> 
imsLogPath = <span style="color: #483d8b;">'d:<span style="color: #000099; font-weight: bold;">\\</span>LogFiles<span style="color: #000099; font-weight: bold;">\\</span>'</span>                     
<span style="color: #808080; font-style: italic;"># Don't use a mapped drive but use UNC for network drives. Task Schedule seems to choke when it calls Python.</span>
newRARPath = <span style="color: #483d8b;">'&quot;<span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\\</span>192.168.1.2<span style="color: #000099; font-weight: bold;">\\</span>Root<span style="color: #000099; font-weight: bold;">\\</span>backups<span style="color: #000099; font-weight: bold;">\\</span>'</span> + dateStamp + <span style="color: #483d8b;">'.rar&quot;'</span>
rarPath    = <span style="color: #483d8b;">'&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Program Files<span style="color: #000099; font-weight: bold;">\\</span>WinRAR<span style="color: #000099; font-weight: bold;">\\</span>rar.exe&quot; a -m5 '</span> + newRARPath 
&nbsp;
<span style="color: #808080; font-style: italic;"># Get Latest Files</span>
smtpLatest   = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;SMTP*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
postLatest   = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;POST*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
ischedLatest = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;iSched*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
relayLatest  = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;Relay*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
qengLatest   = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;Qeng*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Get List of All Files</span>
allFiles     = <span style="color: #dc143c;">os</span>.<span style="color: black;">popen</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;dir /od /a-d /b &quot;</span> + imsLogPath + <span style="color: #483d8b;">&quot;*.log&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">splitlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Remove Latest Files from All Files List</span>
allFiles.<span style="color: black;">remove</span><span style="color: black;">&#40;</span> smtpLatest <span style="color: black;">&#41;</span>
allFiles.<span style="color: black;">remove</span><span style="color: black;">&#40;</span> postLatest <span style="color: black;">&#41;</span>
allFiles.<span style="color: black;">remove</span><span style="color: black;">&#40;</span> ischedLatest <span style="color: black;">&#41;</span>
allFiles.<span style="color: black;">remove</span><span style="color: black;">&#40;</span> relayLatest <span style="color: black;">&#41;</span>
allFiles.<span style="color: black;">remove</span><span style="color: black;">&#40;</span> qengLatest <span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># allFiles Array Has the list of files</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Flatten Array allFiles to be used as a parameter in system command</span>
flatLogPathList = <span style="color: #483d8b;">&quot;&quot;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> filenameWithPath <span style="color: #ff7700;font-weight:bold;">in</span> allFiles:
  flatLogPathList = flatLogPathList + imsLogPath + filenameWithPath + <span style="color: #483d8b;">&quot; &quot;</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;"># Execute WinRar</span>
path = rarPath + <span style="color: #483d8b;">&quot; &quot;</span> + flatLogPathList.<span style="color: black;">rstrip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">'&quot;'</span> + path + <span style="color: #483d8b;">'&quot;'</span> <span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Delete all log files</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">'&quot;del '</span> + flatLogPathList.<span style="color: black;">rstrip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">'&quot;'</span> <span style="color: black;">&#41;</span></pre></div></div>

<p>Then I set up the Scheduled Task:</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/01/ims-1.gif" alt="" title="ims-1" width="405" height="448" class="alignnone size-full wp-image-789" /></p>
<p>With these Settings:</p>
<p><img src="http://www.shinylight.com/wp-content/uploads/2010/01/ims-2.gif" alt="" title="ims-2" width="403" height="448" class="alignnone size-full wp-image-790" /></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;submitHeadline=Compress+and+Move+Log+Files&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;title=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;title=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;title=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;bm_description=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;T=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;title=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;title=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Compress+and+Move+Log+Files+@+http://www.shinylight.com/2010/01/30/compress-and-move-log-files/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/01/30/compress-and-move-log-files/&amp;t=Compress+and+Move+Log+Files" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/01/30/compress-and-move-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Minutes to Hours</title>
		<link>http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/</link>
		<comments>http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 05:24:12 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Automation / Scripting]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.shinylight.com/?p=784</guid>
		<description><![CDATA[I often use both Winamp and my iPhone to listen to music. These two, unfortunately, show the time differently in the songs. Winamp displays the time in minutes (mm) while the iPhone does it hour/minutes (hh:mm). Here&#8217;s a quick little script I whipped together because I&#8217;m too lazy to do this in my head, especially [...]]]></description>
			<content:encoded><![CDATA[<p>I often use both Winamp and my iPhone to listen to music. These two, unfortunately, show the time differently in the songs. Winamp displays the time in minutes (mm) while the iPhone does it hour/minutes (hh:mm). Here&#8217;s a quick little script I whipped together because I&#8217;m too lazy to do this in my head, especially for audio books where an audio book can be over 500 minutes, and I need to convert to iPhone time because I want to continue listening where I had just left off on Winamp.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">use</span> POSIX <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>ceil floor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># used for the floor function</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> GetToken <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;"># @_ = flatten args list from an array</span>
  <span style="color: #666666; font-style: italic;"># @_[0] = first argument</span>
&nbsp;
  <span style="color: #0000ff;">$data</span>      <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$delimiter</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$token</span>     <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #0000ff;">@tokens_array</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$delimiter</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
&nbsp;
  <span style="color: #000066;">return</span> <span style="color: #0000ff;">@tokens_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$token</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> chr_conver_min <span style="color: #009900;">&#123;</span>  
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">return</span> <span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>   
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> iphone_time_convert <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;"># converts winamp time to iphone - winamp stores time only in minutes.  </span>
  <span style="color: #666666; font-style: italic;"># @_[0]   =  winamp_time, e.g. 124:34</span>
  <span style="color: #666666; font-style: italic;"># $hour   = floor($winamp_time/60);</span>
  <span style="color: #666666; font-style: italic;"># $minute = $winamp_time % 60;</span>
&nbsp;
  <span style="color: #0000ff;">$winamp_hour_min</span> <span style="color: #339933;">=</span> GetToken<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
  <span style="color: #0000ff;">$winamp_seconds</span>  <span style="color: #339933;">=</span> GetToken<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
  <span style="color: #000066;">return</span> floor<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$winamp_hour_min</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">.</span>chr_conver_min<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$winamp_hour_min</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$winamp_seconds</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> winamp_time_convert <span style="color: #009900;">&#123;</span>  
&nbsp;
  <span style="color: #666666; font-style: italic;"># converts iphone time to winamp  </span>
  <span style="color: #666666; font-style: italic;"># @_[0] = iphone_time, e.g. 3:43:34    </span>
  <span style="color: #0000ff;">$iphone_hour</span>     <span style="color: #339933;">=</span> GetToken<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
  <span style="color: #0000ff;">$iphone_min</span>      <span style="color: #339933;">=</span> GetToken<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
  <span style="color: #0000ff;">$iphone_seconds</span>  <span style="color: #339933;">=</span> GetToken<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$iphone_hour</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">$iphone_min</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;:&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$iphone_seconds</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> show_help <span style="color: #009900;">&#123;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Displays the conversion of time between winamp and iPhone.<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;   winamptime [-w2i|-i2p] [mm:ss][hh:mm:ss]<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Example to convert winamp time to iPhone: <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;   winamptime -w2i 212:41<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Example to convert iPhone time to winamp, seconds being optional: <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;   winamptime -i2w 2:31:41<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;   winamptime -i2w 2:31<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># START</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Optimize this:</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;-w2i&quot;</span> <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;"># winamp to iphone time</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;iPhone Time: &quot;</span><span style="color: #339933;">.</span>iphone_time_convert<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">elsif</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;-i2w&quot;</span> <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;"># iphone to winamp time</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Winamp Time: &quot;</span><span style="color: #339933;">.</span>winamp_time_convert<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> 
<span style="color: #009900;">&#123;</span>
  show_help<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Output:<br />
<img src="http://www.shinylight.com/wp-content/uploads/2010/01/perltime.gif" alt="" title="perltime" width="521" height="149" class="alignnone size-full wp-image-786" /></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em></em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;submitHeadline=Convert+Minutes+to+Hours&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;title=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;title=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;title=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;bm_description=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;T=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;title=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;title=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Convert+Minutes+to+Hours+@+http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/&amp;t=Convert+Minutes+to+Hours" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.shinylight.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.shinylight.com/2010/01/28/convert-minutes-to-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
