<?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>Eric Fickes &#187; cmd</title>
	<atom:link href="http://ericfickes.com/tag/cmd/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericfickes.com</link>
	<description>Design minded Internet Programmer</description>
	<lastBuildDate>Fri, 28 Oct 2011 04:14:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Today I took 30 minutes to save hours</title>
		<link>http://ericfickes.com/2011/01/today-i-took-30-minutes-to-save-hours/</link>
		<comments>http://ericfickes.com/2011/01/today-i-took-30-minutes-to-save-hours/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 04:21:41 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[batch file]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[DECLARE]]></category>
		<category><![CDATA[del]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[fetch]]></category>
		<category><![CDATA[fetch_status]]></category>
		<category><![CDATA[information_schema]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[sproc]]></category>
		<category><![CDATA[sqlcmd]]></category>
		<category><![CDATA[sys]]></category>
		<category><![CDATA[tsql]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1861</guid>
		<description><![CDATA[UPDATE &#8211; 1/6/2011 : Since writing this post I have bundled this entire reset process into a single windows batch file. In addition to restoring my database, I also have to remove temp files from my server, so it was &#8230; <a href="http://ericfickes.com/2011/01/today-i-took-30-minutes-to-save-hours/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong> </strong><strong>UPDATE &#8211; </strong><strong>1/6/2011 : </strong>Since writing this post I have bundled this entire reset process into a single <a title="How to use windows batch files" href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true" target="_blank">windows batch file</a>. In addition to restoring my database, I also have to remove temp files from my server, so it was time to go command line with all of this.</p>
<p>Here the contents of my batch file.</p>
<pre class="brush: plain; title: ; notranslate">
### DELETE TEMP FILES
del /q /f /s Z:\_FavoriteClient\_GIT_\webapp\invoices\* /f /s

### RESTORE DATABASE
sqlcmd -S &quot;localhost&quot; -i Z:\_FavoriteClient\_GIT_\sql\restoreBackup.sql
</pre>
<p>To use this in a .bat file, copy and paste the text into Notepad, then save as &#8220;restore.bat&#8221;.  Remember, you will need to wrap your filename.bat with quotes, otherwise Notepad will save the file as filename.bat.txt.</p>
<p>* The contents of restoreBackup.sql is listed below.</p>
<hr style="color: efefef;" size="1" noshade="noshade" />One of my favorite pastimes as a programmer is writing code that writes code, aka workflow automation.  It&#8217;s not something I do on every project, but I&#8217;ve been doing a lot of SQL Server development recently, and I&#8217;ve been having a lot of fun using the <a title="SQL 2008 RS Information Schema Views (Transact-SQL)" href="http://msdn.microsoft.com/en-us/library/ms186778.aspx" target="_blank">INFORMATION_SCHEMA views</a> to <a title="Use TSQL to generate Actionscript VO classes" href="http://ericfickes.posterous.com/tsql-sproc-generatetablevoclass" target="_blank">build VO classes</a>, forms representing tables, or just finding what tables have a specific column.  Today I took a 30 minute trip to the <a title="SQL 2008 SYS tables" href="http://msdn.microsoft.com/en-us/library/ms187406.aspx" target="_blank">SYS side</a> and wrote a tsql script that will save me hours.</p>
<p>The web application I&#8217;m working on is a payment processor made up of five steps.  In order to test I have to setup multiple sales for multiple clients, then log in as three different admin users to push the transactions through the system.  This gets my test transactions to the proper testable state.  The process of setting up testable transactions takes over 30 clicks, and once I hit step 3 of the wizard, my test transactions are completed in a way that I have to re-setup the test data ( 20 GOTO 10 ).</p>
<p>I thought about a handful of options, and ended up going with this solution.</p>
<ol>
<li>Setup all test transactions in web application by hand ( get the data ready )</li>
<li>Take a full database backup ( freeze the data )</li>
<li>Use TSQL script to drop all connections to my app&#8217;s db, then restore the database to the &#8220;testable&#8221; state from step 1 ( reset the DB )</li>
</ol>
<p>Here is my TSQL script</p>
<pre class="brush: sql; title: ; notranslate">
DECLARE @sessID int,
		@dbName varchar(50),
		@userName varchar(50),
		@backupFile varchar(200)

SET @dbName		= 'DA413'	-- your database name
SET @userName	= 'DA413'	-- sql user account to look for
SET @backupFile = 'D:\DB\Backup\DA413.bak' -- path to SQL backup file

-- use a cursor to store all session_ids
DECLARE session_cursor CURSOR
FOR
	SELECT	session_id
	FROM	sys.dm_exec_sessions
	WHERE	original_login_name = @userName

	-- open cursor and grab first row
	OPEN session_cursor
	FETCH NEXT FROM session_cursor INTO @sessID

	-- loop through session_ids
	WHILE @@FETCH_STATUS = 0
	BEGIN

		-- kill it
		-- using EXEC because the sproc kill does not like @variables
		EXEC('kill ' + @sessID)

		-- get the next session_id
		FETCH NEXT FROM session_cursor INTO @sessID
	END

-- cursor cleanup
CLOSE session_cursor
DEALLOCATE session_cursor

-- restore backup
USE master
	RESTORE DATABASE DA413
	FROM DISK = @backupFile
GO
</pre>
<p>A few notes about this script :</p>
<ul>
<li>I only need to disconnect my web application&#8217;s database user, not any user</li>
<li>I&#8217;m using the latest full backup, and not a specific database snapshot</li>
<li>The SPROC <a title="TSQL KILL sproc" href="http://technet.microsoft.com/en-us/library/ms173730.aspx" target="_blank">kill</a> doesn&#8217;t like @variables as input, so use <a title="TSQL EXEC" href="http://msdn.microsoft.com/en-us/library/ms188332.aspx" target="_blank">EXEC</a></li>
<li>Your web server doesn&#8217;t know the user was disconnected, so you&#8217;ll have to log back into your application.</li>
<li>If you use this technique, be sure to RERUN your backup if you add anything to the database ( EX : new table column, stored procedure, etc )</li>
<li>If you&#8217;re not the only person connected to this database, make sure you don&#8217;t disconnect anybody else using the same database name</li>
</ul>
<p>This solution is perfect for me because I have full control over my code, database, and server.  It&#8217;s also great because I can test my application, run a single sql script, and 10 seconds later I can test my application again.  While this solution is perfect for me, it&#8217;s probably best used as reference for others.  However, this technique of rolling back the database could be applied to <em>any</em> software application using SQL Server for it&#8217;s datasource.</p>
<p>Hope this helps somebody.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/01/today-i-took-30-minutes-to-save-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read flashlog.txt using AIR2 and NativeProcess</title>
		<link>http://ericfickes.com/2010/10/read-flashlog-txt-using-air2-and-nativeprocess/</link>
		<comments>http://ericfickes.com/2010/10/read-flashlog-txt-using-air2-and-nativeprocess/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 00:41:13 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[flash platform]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[air2]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[NativeProcess]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[tail]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1701</guid>
		<description><![CDATA[I&#8217;m sure you know by now that the Flash Platform is a great choice for making great front end applications to databases, or web services.  However, did you know with the release of AIR2 you can now use Flash or &#8230; <a href="http://ericfickes.com/2010/10/read-flashlog-txt-using-air2-and-nativeprocess/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">
<p>I&#8217;m sure you know by now that <a title="Adobe's Flash Platform ( Flash, Flex, AIR )" href="http://www.adobe.com/flashplatform/" target="_blank"><span style="color: #444444;">the Flash Platform</span></a> is a great choice for making great front end applications to databases, or web services.  However, did you know with the release of AIR2 you can now use Flash or Flex to make gui front ends for existing programs or processes on your machine?  That&#8217;s right, AIR2 brings us a new feature called NativeProcess which let&#8217;s you communicate with existing programs or processes running on your machine.</p>
</div>
<div>
<p><strong>Native Processes</strong>: Launch and communicate with native &#8220;out-of-band&#8221; processes. Bundle your own native executables, or call executables that you know are already on the machine. This feature requires that your application be installed with a native installer rather than though a .AIR file (we provide tools for building native installers).</p>
<ul>
<li>Types of installers:
<ul>
<li>OS X: DMG</li>
<li>Windows: EXE</li>
<li>Linux: Debian and Red Hat Package Manager</li>
</ul>
</li>
</ul>
</div>
<p>See <a title="Everything new in Adobe's AIR2" href="http://blogs.adobe.com/cantrell/archives/2009/10/everything_new_in_air_2.html" target="_blank"><span style="color: #444444;">Christian Cantrell&#8217;s blog for the rest of the AIR2 new feature list</span></a>.</p>
<p>I really enjoy building small apps for myself that are either fun or help with workflow.  Recently I was on an <a title="Checkout the Endlessmural.com project &gt; crazy HTML5 drawing tool" href="http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/" target="_self"><span style="color: #444444;">HTML5 project</span></a> that required me to upgrade all my browsers to the absolute latest versions.  Well when I upgraded Firefox to 3.6, I could no longer use my <a title="FlashTracer is a Firefox add-on that shows you the contents of flashlog.txt" href="https://addons.mozilla.org/en-US/firefox/addon/3469/" target="_blank"><span style="color: #444444;">Flash Tracer add-on</span></a>, which caused a big workflow issue with my current Flex project.  While I know there are plenty of debug alternatives to Flash Tracer, I thought this would be a perfect chance to take AIR2&#8242;s NativeProcess out for a spin.  It also gave me a simple demo app for my <a title="I gave a talke at 360Flex DC titled 'Screw HTML5, make cool shit with AIR'" href="http://ericfickes.com/2010/09/my-360flex-dc-talk-about-html5-and-air/" target="_self"><span style="color: #444444;">talk at 360Flex about AIR</span></a>.</p>
<p>So here&#8217;s what the simple logger app looks like.</p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_1706" class="wp-caption aligncenter" style="width: 654px;"><a href="http://ericfickes.com/wp-content/uploads/2010/10/air2bugger-LOG.png" rel="lightbox[1701]"><img class="size-full wp-image-1706 " title="AIR2 flashlog.txt reader" src="http://ericfickes.com/wp-content/uploads/2010/10/air2bugger-LOG.png" alt="AIR2's NativeProcess allowed me to build a simple flashlog.txt reader" width="644" height="528" /></a>With AIR2&#8242;s NativeProcess, you can build all sorts of cool new AIR apps like a flashlog.txt reader </dl>
</div>
<p>Now that you&#8217;ve been blown away by my design skills, let&#8217;s walk through what, how, and where to get this app.</p>
<h2>WHAT</h2>
<h2><span style="color: #444444; line-height: 24px; font-size: 16px;">AIR2, cross platform ( mac, win ), flashlog.txt reader. </span></h2>
<p><span style="font-size: 13px; line-height: 19px;"> </span></p>
<h2 style="font-family: Georgia, 'Bitstream Charter', serif; color: #000000; line-height: 1.5em; font-size: 1.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; font-weight: normal;">HOW</h2>
<p><strong>Cross Platform</strong> &#8211; to take advantage of NativeProcess, your application must be installed as a native installer.  After you build your application, when you export the release build you select native installer instead of .air file.  When building AIR apps that you want to export as a native installer, you must build your application on the correct platform.  That is, I can&#8217;t build the .exe of this application on OS X, only the .dmg installer.</p>
<div id="attachment_1712" class="wp-caption aligncenter" style="width: 655px"><a href="http://ericfickes.com/wp-content/uploads/2010/10/export-native-installer.png" rel="lightbox[1701]"><img class="size-full wp-image-1712" title="NativeProcess requires a native installer" src="http://ericfickes.com/wp-content/uploads/2010/10/export-native-installer.png" alt="If using NativeProcess, export native installer instead of .AIR" width="645" height="532" /></a><p class="wp-caption-text">FlashBuilder option for native installer is in export release dialog</p></div>
<p>Since this app is so small I had no problem storing the OS X and Windows specific code in the same place.  When the app is run I use <a title="Use flash.system.Capabilities to determine what platform you're running on" href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/system/Capabilities.html" target="_blank">flash.system.Capabilities.os</a> to determine Windows or MAC.  I know <a title="The path to flashlog.txt is now hard coded?  Really?" href="http://forums.adobe.com/message/3045268" target="_blank">the path to flashlog.txt is now hard coded into Flash Player</a>, but I still have to build the platform appropriate path to flashlog.txt.</p>
<p style="font-family: Georgia, 'Bitstream Charter', serif; color: #444444; line-height: 1.5; font-size: 16px; margin-bottom: 24px;">MAC - <em>/Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt</em></p>
<p>WIN - <em>C:\Users\{username}\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txt</em></p>
<p>To grab the current username I parsed the results of <a title="AIR lets you grab user directories using Fil.userDirectory" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html?filter_osmf=1&amp;filter_flashplayer=10&amp;filter_air=1.5" target="_blank">File.userDirectory.url</a>.  The last piece to setup is the path to the executable used by NativeProcess.  On OS X I&#8217;m using tail, which lives at /usr/bin/tail.  For Windows7, Powershell <em>should</em> live at C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.</p>
<p><strong>TIP :</strong> <em>On OS X, you can use the &#8220;which&#8221; command to locate a program ( EX : which tail ).  On Windows, use the &#8220;where&#8221; command to locate a program ( EX : where powershell.exe ).  You will want to know this if the paths in this app doesn&#8217;t work for you.</em></p>
<p><strong>Read flashlog.txt</strong> &#8211; to read flashlog.txt on OS X I&#8217;m using NativeProcess + <a title="Unix command TAIL" href="http://en.wikipedia.org/wiki/Tail_(Unix)" target="_blank">tail</a>.  On windows I&#8217;m using NativeProcess + <a title="PowerShell :: Using the Get-Content Cmdlet" href="http://technet.microsoft.com/en-us/library/ee176843.aspx" target="_blank">Powershell&#8217;s Get-Content cmdlet</a>.  Now that we know platform and paths, it&#8217;s time to setup our <a title="This class provides the basic information used to start a process on the host operating system. It is constructed and passed to the start() method of a NativeProcess object" href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/desktop/NativeProcessStartupInfo.html" target="_blank">NativeProcessStartupInfo</a> which will contain the executable we&#8217;re going to use, plus any required arguments.  In order to setup your NativeProcessStartupInfo object, you will need to know how to use the nativeprocess via command line first.  Using OS X&#8217;s tail as the sample, you can read the contents of flashlog.txt by running this in Terminal.</p>
<pre>tail -f /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt</pre>
<div id="attachment_1717" class="wp-caption aligncenter" style="width: 598px"><a href="http://ericfickes.com/wp-content/uploads/2010/10/tail-flashlog-terminal.png" rel="lightbox[1701]"><img class="size-full wp-image-1717" title="using tail to read flashlog.txt in terminal" src="http://ericfickes.com/wp-content/uploads/2010/10/tail-flashlog-terminal.png" alt="tail -f shows you the contents of a file as it changes" width="588" height="367" /></a><p class="wp-caption-text">I can run tail in Terminal, or in an AIR application using NativeProcess</p></div>
<p>Here is the equivalent AS3 setup for running the same command via NativeProcess.  The executable is set to a <a title="A File object represents a path to a file or directory. This can be an existing file or directory, or it can be one that does not yet exist; for instance, it can represent the path to a file or directory that you plan to create" href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/filesystem/File.html" target="_blank">File</a> which points at tail.  The arguments required by tail are stored in a Vector&lt;String&gt;.</p>
<pre class="brush: as3; title: ; notranslate">
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = new File(&amp;quot;/usr/bin/tail&amp;quot;);

var processArgs:Vector.&amp;lt;String&amp;gt; processArgs = new Vector.&amp;lt;String&amp;gt;();
processArgs.push(&amp;quot;-f&amp;quot;);
processArgs.push( &amp;quot;/Users/&amp;quot;+user+&amp;quot;/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt&amp;quot; );

nativeProcessStartupInfo.arguments = processArgs;
</pre>
<p>Now that the startup info is set, it&#8217;s time to setup our NativeProcess listeners, then start the process.</p>
<pre class="brush: as3; title: ; notranslate">
var process:NativeProcess = new NativeProcess();

// add listeners
process.addEventListener(NativeProcessExitEvent.EXIT, onNativeProcessExit );
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onStandardOutput );
process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, onStandardInput );
process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError );
process.addEventListener(IOErrorEvent.IO_ERROR, onIOError );

process.start(nativeProcessStartupInfo);
</pre>
<p>And that&#8217;s all there is to it, the important bits of reading flashlog.txt using AIR2&#8242;s NativeProcess.  NativeProcess has me excited because it opens a whole new world of apps that can be built.</p>
<p>I wrote this app for personal use and my 360Flex talk.  If you have interest in seeing more AIR2 samples, have a look at <a title="AIR2 sample links from my 360Flex DC talk on HTML5 and AIR" href="http://www.delicious.com/ericfickes/360FlexDCLinks+air2" target="_blank">http://www.delicious.com/ericfickes/360FlexDCLinks+air2</a>.  I put together a bunch of links supporting my talk on HTML and AIR which should keep you busy for a while.</p>
<h2 style="font-family: Georgia, 'Bitstream Charter', serif; color: #000000; line-height: 1.5em; font-size: 1.8em; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; font-weight: normal;">WHERE</h2>
<table>
<tbody>
<tr>
<td valign="top">
<p><div id="attachment_1726" class="wp-caption aligncenter" style="width: 220px"><a href="http://ericfickes.com/code/AIR2BUGGER_src.zip"><img class="size-full wp-image-1726" title="Download full source to air2bugger" src="http://ericfickes.com/wp-content/uploads/2010/10/air2bugger_src_contents.png" alt="Contents of AIR2BUGGER_src.zip" width="210" height="340" /></a><p class="wp-caption-text">Click me to download the full source AIR2BUGGER</p></div></td>
<td valign="top"><a title="Download OSX installer AIR2BUGGER.dmg" href="http://ericfickes.com/code/AIR2BUGGER.dmg" target="_blank">OS X DMG INSTALLER</a></td>
<td valign="top"><a title="Windows installer for AIR2BUGGER" href="http://ericfickes.com/code/AIR2BUGGER.exe" target="_blank">WINDOWS EXE INSTALLER</a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/10/read-flashlog-txt-using-air2-and-nativeprocess/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Weird, that bat file path doesn&#8217;t jive from the toolbar</title>
		<link>http://ericfickes.com/2010/04/weird-that-bat-file-path-doesnt-jive-from-the-toolbar/</link>
		<comments>http://ericfickes.com/2010/04/weird-that-bat-file-path-doesnt-jive-from-the-toolbar/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 06:20:56 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ramblings]]></category>
		<category><![CDATA[Adobe Version Cue]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Folder Toolbar]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[Windows7]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1430</guid>
		<description><![CDATA[I just noticed something when running some batch files on Windows 7. If I launch the file from Windows Explorer, the path in the command window matches the location of the batch file. However, I typically launch my batch files &#8230; <a href="http://ericfickes.com/2010/04/weird-that-bat-file-path-doesnt-jive-from-the-toolbar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just noticed something when running some batch files on Windows 7.  If I launch the file from Windows Explorer, the path in the command window matches the location of the batch file.</p>
<div id="attachment_1431" class="wp-caption aligncenter" style="width: 440px"><a href="http://ericfickes.com/wp-content/uploads/2010/04/bat-explorer-matching.png" rel="lightbox[1430]"><img class="size-full wp-image-1431" title="Paths match" src="http://ericfickes.com/wp-content/uploads/2010/04/bat-explorer-matching.png" alt="Bat file path and cmd paths match when you double click it" width="430" height="378" /></a><p class="wp-caption-text">The paths, they match!</p></div>
<p>However, I typically launch my batch files from a toolbar on my taskbar that points to the same folder.  The batch file still works, but the path shown in the command window is weird.  I have no idea how an Adobe Version Cue path could get injected, but it does.</p>
<div id="attachment_1432" class="wp-caption aligncenter" style="width: 691px"><a href="http://ericfickes.com/wp-content/uploads/2010/04/bat-toolbar-weird.png" rel="lightbox[1430]"><img class="size-full wp-image-1432" title="How did Adobe Version Cue get into there?" src="http://ericfickes.com/wp-content/uploads/2010/04/bat-toolbar-weird.png" alt="Launching a bat from a toolbar injects a path to Adobe Version Cue?" width="681" height="573" /></a><p class="wp-caption-text">Weird paths</p></div>
<p>To capture both shots of the command window I had to hit Pause.  These aren&#8217;t faked, they&#8217;re just completely random.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/04/weird-that-bat-file-path-doesnt-jive-from-the-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XCOPY script maker utility</title>
		<link>http://ericfickes.com/2008/11/xcopy-script-maker-utility/</link>
		<comments>http://ericfickes.com/2008/11/xcopy-script-maker-utility/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 20:39:23 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[HTA]]></category>
		<category><![CDATA[xcopy]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=325</guid>
		<description><![CDATA[Here is an old utility project I started a few years ago to help make XCOPY scripts.  It&#8217;s an HTA ( HTML Application ) so it currently only runs in Internet Explorer.  Normally I wouldn&#8217;t release IE only code, but &#8230; <a href="http://ericfickes.com/2008/11/xcopy-script-maker-utility/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is an old utility project I started a few years ago to help make XCOPY scripts.  It&#8217;s an HTA ( <a title="Read about HTAs on MSDN" href="http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx" target="_blank">HTML Application</a> ) so it currently only runs in Internet Explorer.  Normally I wouldn&#8217;t release IE only code, but XCOPY is a windows only utility, and this is really just a quick and dirty little tool.</p>
<p>Usage is simple :</p>
<ol>
<li>Open with Internet Explorer</li>
<li>Point and click through the options</li>
<li>Click the &#8216;Make Script&#8217; button</li>
</ol>
<p>From here you can paste the xcopy script directly onto the command line, or into notepad and Save As &#8220;yourfile.bat&#8221;.</p>
<p><a href="http://ericfickes.com/wp-content/uploads/2008/11/xcopier.hta">Download xcopier here</a></p>
<div id="attachment_326" class="wp-caption aligncenter" style="width: 510px"><a href="http://ericfickes.com/wp-content/uploads/2008/11/xcopy-maker.png" rel="lightbox[325]"><img class="size-full wp-image-326" title="xcopy-maker" src="http://ericfickes.com/wp-content/uploads/2008/11/xcopy-maker.png" alt="XCOPY maker in action" width="500" height="621" /></a><p class="wp-caption-text">XCOPY maker in action</p></div>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2008/11/xcopy-script-maker-utility/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to find files quickly using the DIR command</title>
		<link>http://ericfickes.com/2007/09/how-to-find-files-quickly-using-the-dir-command/</link>
		<comments>http://ericfickes.com/2007/09/how-to-find-files-quickly-using-the-dir-command/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 00:39:00 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[dir]]></category>
		<category><![CDATA[dir /s]]></category>
		<category><![CDATA[file search]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://ericfickes.com/2007/09/30/98/</guid>
		<description><![CDATA[How to find files quickly using the DIR command. Here&#8217;s a quick way to find files on your windows machine using the command line, instead of the built in search functionality. Drop to a command line. CD your way to &#8230; <a href="http://ericfickes.com/2007/09/how-to-find-files-quickly-using-the-dir-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="FONT-WEIGHT: bold">How to find files quickly using the DIR command.</span></p>
<p>Here&#8217;s a quick way to find files on your windows machine using the command line, instead of the built in search functionality.</p>
<ol>
<li>Drop to a command line.</li>
<li>CD your way to the folder you want to search.</li>
<li>Type &#8220;dir /S *your file name here*</li>
<li>Hit enter.</li>
</ol>
<p>So if you wanted to find that hot track on your mp3 drive but don&#8217;t know where it&#8217;s located, you could do something like this : &#8220;dir /S *humps*.mp3&#8243;</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2007/09/how-to-find-files-quickly-using-the-dir-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

