<?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"
	>

<channel>
	<title>glob</title>
	<atom:link href="http://glob.com.au/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://glob.com.au/blog</link>
	<description></description>
	<pubDate>Mon, 30 Jun 2008 02:00:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
			<item>
		<title>using forfiles to clean your temp directory</title>
		<link>http://glob.com.au/blog/2008/06/30/using-forfiles-to-clean-your-temp-directory/</link>
		<comments>http://glob.com.au/blog/2008/06/30/using-forfiles-to-clean-your-temp-directory/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 02:00:52 +0000</pubDate>
		<dc:creator>byron</dc:creator>
		
		<category><![CDATA[batch]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://glob.com.au/blog/?p=16</guid>
		<description><![CDATA[A relatively unknown batch file utility which ships with Windows (Vista) is forfiles:
Selects a file (or set of files) and executes a command on that file. This is helpful for batch jobs.
On all of my workstations I have a task scheduled to run nightly:
forfiles /p "%TEMP%" /m *.* /s /d -28 /c "cmd /c if [...]]]></description>
			<content:encoded><![CDATA[<p>A relatively unknown batch file utility which ships with Windows (Vista) is <strong>forfiles</strong>:</p>
<pre>Selects a file (or set of files) and executes a command on that file. This is helpful for batch jobs.</pre>
<p>On all of my workstations I have a task scheduled to run nightly:</p>
<pre>forfiles /p "%TEMP%" /m *.* /s /d -28 /c "cmd /c if @isdir==TRUE (echo rmdir @path) else (echo del /q @path)"</pre>
<p>This deletes all files from my temp directory older than 28 days.</p>
<p>I used to have a Perl script that does this, and I&#8217;ve seen this done with complicated for syntax, however this doesn&#8217;t require anything to be installed, and is much simpler <img src='http://glob.com.au/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://glob.com.au/blog/2008/06/30/using-forfiles-to-clean-your-temp-directory/feed/</wfw:commentRss>
		</item>
		<item>
		<title>pushd/popd and UNC paths</title>
		<link>http://glob.com.au/blog/2008/06/23/pushdpopd-and-unc-paths/</link>
		<comments>http://glob.com.au/blog/2008/06/23/pushdpopd-and-unc-paths/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 02:00:10 +0000</pubDate>
		<dc:creator>byron</dc:creator>
		
		<category><![CDATA[batch]]></category>

		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://glob.com.au/blog/?p=15</guid>
		<description><![CDATA[According to the help for pushd:
Stores the current directory for use by the POPD command, then changes to the specified directory.
Generally you use it like:
C:\&#62;pushd c:\windows\system32
c:\Windows\System32&#62;rem blah
c:\Windows\System32&#62;popd
C:\&#62;
Not very exciting.
However pushd has a little known feature; you can dynamically map UNC paths:
C:\&#62;pushd \\server\netlogon
Z:\&#62;rem blah
Z:\&#62;popd
C:\&#62;
In this case pushd finds the first available drive letter (working backwards from [...]]]></description>
			<content:encoded><![CDATA[<p>According to the help for <strong>pushd</strong>:</p>
<pre>Stores the current directory for use by the POPD command, then changes to the specified directory.</pre>
<p>Generally you use it like:</p>
<pre>C:\&gt;pushd c:\windows\system32
c:\Windows\System32&gt;rem blah
c:\Windows\System32&gt;popd
C:\&gt;</pre>
<p>Not very exciting.</p>
<p>However pushd has a little known feature; you can dynamically map UNC paths:</p>
<pre>C:\&gt;pushd \\server\netlogon
Z:\&gt;rem blah
Z:\&gt;popd
C:\&gt;</pre>
<p>In this case pushd finds the first available drive letter (working backwards from Z:), maps a network drive, and changed the current working directory to it.  popd then unmaps the network drive.</p>
<p>This makes is a <em>very</em> handy tool for batch scripting, including in login scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://glob.com.au/blog/2008/06/23/pushdpopd-and-unc-paths/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
