<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Brock Angelo &#187; Batch</title>
	<atom:link href="http://brockangelo.com/category/code/batch-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://brockangelo.com</link>
	<description>@gmail.com</description>
	<lastBuildDate>Fri, 22 Jul 2011 14:00:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>April Fool&#8217;s Batch File</title>
		<link>http://brockangelo.com/2010/02/03/april-fools-batch-file/</link>
		<comments>http://brockangelo.com/2010/02/03/april-fools-batch-file/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 16:25:18 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[april fools day]]></category>
		<category><![CDATA[batch files]]></category>
		<category><![CDATA[fake format]]></category>
		<category><![CDATA[format hard drive]]></category>
		<category><![CDATA[gags]]></category>
		<category><![CDATA[jokes]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1328</guid>
		<description><![CDATA[The ultimate April Fool's Day joke for any geek: a tool that appears to format the hard drive.]]></description>
			<content:encoded><![CDATA[<p>It is early February, which means time to start planning for April Fool&#8217;s Day. Here is one I&#8217;ve had up my sleeve for some time. A simple batch file that gives the appearance of formatting the Windows hard drive. Rough enough to make even a seasoned administrator do a double take.</p>
<p>Here is the breakdown of what it does.</p>
<ol>
<li>Show a pleasant, matter of fact message: Windows will now format your hard drive</li>
<li>Wait for three seconds</li>
<li>Enlarge the DOS window</li>
<li>Display the contents of the entire drive.</li>
</ol>
<p>It simply lists the name of every file on the entire hard drive, but it happens so fast and moves so quickly that it is sure to get a couple of knee jerks here and there.</p>
<p>If you want to be really devious, place this on someone&#8217;s hard drive, then create a shortcut to the batch file and change the default icon to something that isn&#8217;t as obvious as the batch icon. To be reeeeally devious, rename the shortcut to something like &#8220;Internet Explorer&#8221;. <img src='http://brockangelo.com/wp-includes/images/smilies/icon_surprised.gif' alt=':-o' class='wp-smiley' /> </p>
<p>Here is the batch file in plain text. To use this, copy the text below and save it to your computer as &#8220;format.bat&#8221;.</p>
<pre class="brush: plain; title: ; notranslate">@echo off
REM Fake Format - A perfect April Fool's Day gift
REM Rename to your liking (something like &quot;Free.bat&quot; is suitably devious)
REM Then make sure you are there to watch their response
REM http://brockangelo.com/2010/02/03/april-fools-batch-file/

@echo off
echo.
echo.
echo.
echo            Windows will now format your hard drive
echo.
echo.
echo.
echo.
ping -n 3 127.0.0.1 &gt; nul
cd c:\
mode con: cols=140 lines=60
dir /w /s
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2010/02/03/april-fools-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Start a Virtual Machine at Startup Using VirtualBox</title>
		<link>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/</link>
		<comments>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 22:25:22 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[tweakui]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1309</guid>
		<description><![CDATA[How to start a Virtual Machine at startup, (aka: start at VM at boot) if you are using VirtualBox.]]></description>
			<content:encoded><![CDATA[<p>This did not seem obvious to me, so I hope it is valuable to someone else. If you are using VirtualBox to host your newly created Virtual Servers, one of the questions you will find yourself asking is: &#8220;What if my machine reboots?&#8221; VirtualBox does not (yet) have a built in way to indicate that you want to start a VM when your Host machine boots, so you need to add this to your startup.</p>
<p>If you are on Windows, create a batch file with the following content:</p>
<p><code lang="batch"><br />
@echo off<br />
cls<br />
"C:\Program Files\Sun\VirtualBox\VBoxManage.exe" startvm vm-name<br />
@exit<br />
</code></p>
<p>You should replace &#8220;vm-name&#8221; with the name of the Virtual Machine you want to start. If you are on XP, make sure you are using TweakUI to auto-login to XP.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run a Batch File Invisibly</title>
		<link>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/</link>
		<comments>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:55:40 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[invisible]]></category>
		<category><![CDATA[visual basic]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1279</guid>
		<description><![CDATA[Run a Batch File invisibly. Users won't know a thing.]]></description>
			<content:encoded><![CDATA[<p>Running a batch file invisibly can come in handy, especially if you manage computers for other users. It allows you to perform a task without the user knowing anything about it.</p>
<p>Its very simple. Instead of telling the batch file to run, you tell a Visual Basic script to launch the batch file; and Visual Basic has the ability to launch things invisibly.</p>
<blockquote><p>Follow this demo and you’ll be up and running in just a few seconds</p>
<p>You’ll create two files: the vbs script and a sample batch file</p>
<p>&#160;</p>
</blockquote>
<p>Open Notepad, and paste this content, then save the file as <strong>invisible.vbs </strong>to the Desktop</p>
<blockquote><p>Set WshShell = CreateObject(&quot;WScript.Shell&quot;)     <br />WshShell.Run chr(34) &amp; &quot;C:\Documents and Settings\%username%\Desktop\1.bat&quot; &amp; Chr(34), 0      <br />Set WshShell = Nothing</p>
</blockquote>
<p><a href="http://media.brockangelo.com/all_files_txt.jpg" alt="click to enlarge"><img style="display: block; float: none; margin-left: auto; margin-right: auto" height="284" src="http://media.brockangelo.com/all_files_txt.jpg" width="413" /></a></p>
<p>&#160;</p>
<p>Open Notepad again, and paste this content, then save the file as <strong>1.bat </strong>to the Desktop:</p>
<blockquote><p>echo hello &gt; &quot;C:\Documents and Settings\%username%\Desktop\1.txt&quot;</p>
</blockquote>
<p>&#160;</p>
<p>Now double click on <strong>invisible.vbs</strong>. You should see a <strong>1.txt</strong> file get magically (<em>invisibly</em>) created on the Desktop.</p>
<p>That’s it! Modify to your liking!</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically Upload Photos to Flickr</title>
		<link>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/</link>
		<comments>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:06:07 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[automatically upload to flickr]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Digital Photography]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[lifehacker]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[uploadr]]></category>
		<category><![CDATA[xmltramp]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1158</guid>
		<description><![CDATA[Automatically upload photos &#038; videos to Flickr - you plug in your camera, and in just 10 seconds you are walking away with your camera in hand.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how this will work: you&#8217;ll plug in your card reader or digital camera and all your photos &#038; videos are automatically copied to the folders of your choice in about 3 to 5 seconds. Once the photos are copied to the PC, they are automatically removed from the card (this is optional, but recommended). After they have been deleted from the card, they are automatically uploaded to your <a href="http://flickr.com/photos/brockangelo">Flickr</a> account (as private, public, tagged, not tagged, whatever). All in the background without you having to do a thing.</p>
<p>I set this up because my photography workflow had turned into something horrid: I have two digital cameras that we use. One of the two has video, but I don&#8217;t use Flickr for my videos, I use <a href="http://motionbox.com" target="_blank">Motionbox</a>. So to get photos or videos off the cameras involved the following:</p>
<ol>
<li>Plug in each card</li>
<li>Copy the pics from the card to the PC, name the folders, etc</li>
<li>Copy the videos to the My Videos folder</li>
<li>Delete the photos &#038; videos from the card</li>
<li>Use the Flickr Uploadr and hope it successfully uploads all the pics</li>
<li>Upload videos to <a href="http://motionbox.com" target="_blank">Motionbox</a>.</li>
<li>Come back later and delete the photos &#038; videos off the PC after they got uploaded</li>
</ol>
<p>I decided to put a little thought into it and get a better setup. I now do the following:</p>
<ol>
<li>Insert flash card into card reader right after taking pictures &#8211; <strong>pictures &#038; videos download automatically in less than 10 seconds</strong> &#8211; card automatically formats (<i>optional, but recommended</i>)</li>
<li>(<i>photos are now uploading to Flickr in the background &#8211; so I leave <img src='http://brockangelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </i>)</li>
</ol>
<p>I&#8217;ve completely eliminated my involvement with the computer. I simply plug in the card reader (or camera) and the computer takes care of the entire process of copying the photos over to the computer, then deleting them from the card. It then automatically uploads the photos to Flickr as private. All in the background without any of my involvement. </p>
<blockquote><p>You can modify the batch file to upload all photos and videos to Flickr.</p></blockquote>
<p>There are several steps you&#8217;ll need to take in order for the process to be completely automatic. Here is an outline of what all is involved. Start to finish the process takes about 15 minutes.</p>
<ol>
<li>Give Digital Cameras persistent drive letters (E:, F:, G:)</li>
<li>Download Python</li>
<li>Download the &#8220;Uploadr&#8221; python scripts</li>
<li>Download the batch file for your camera</li>
<li>Install TweakUI and add Batch file to the AutoPlay menus</li>
<li>Configure AutoPlay for your digital camera</li>
<li>Test it out</li>
</ol>
<h2>First Step</h2>
<h3>Give Memory Cards and Digital Cameras persistent drive letters (E:, F:, G:)</h3>
<p>In order for you to be able to reliably copy images from a particular card or device, you should set it up so that every time you plug in the device it uses the same drive letter. With your memory card or device plugged in, right click <strong>My Computer</strong> and select <strong>Manage</strong>: </p>
<blockquote><p> <center><img src="http://media.brockangelo.com/wp-content/uploads/2009/07/my_computer_manage.jpg" alt="my_computer_manage" title="my_computer_manage" width="203" height="132" class="aligncenter size-full wp-image-1162" /></center></p></blockquote>
<p>Select <strong>Storage &#8658; Disk Management</strong> (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/disk_management/" rel="attachment wp-att-1163">see picture</a>)</p>
<p>In the right panel, your devices will be listed, probably with letters like E, F or G. Do not change the drive letter of the C: drive, and you probably shouldn&#8217;t change a D: drive if you have one either. Right click on the flash drive that you need to change and select <strong>Change Drive Letter and Paths</strong>: (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/change_drive_letter/" rel="attachment wp-att-1164">see picture</a>)</p>
<p>The next box shows you the letter that is already assigned. Just click <strong>Change</strong>:<br />
<img src="http://media.brockangelo.com/wp-content/uploads/2009/07/change_drive_letter_box-300x194.jpg" alt="change_drive_letter_box" title="change_drive_letter_box" width="300" height="194" class="aligncenter size-medium wp-image-1165" /></p>
<p>This box will ask you what letter you want to assign to it. I start from the bottom, in this case, Z: (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/select_drive_letter/" rel="attachment wp-att-1166">see picture</a>)</p>
<p>It will ask you to confirm this. Click <strong>Yes</strong>. (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/are_you_sure/" rel="attachment wp-att-1167">see picture</a>)</p>
<p>Repeat this for each card or camera that you would like to setup for this.</p>
<p>Now if you go to My Computer, your drive letters should be updated to the new letters.</p>
<h2>Next Step</h2>
<h3>Download Python</h3>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

