Using XCopy and excluding files and or directories

I use XCopy to back stuff up because it’s fast and easy.  Until you add 11,898 files you don’t want to actually backup.
So I set about trying to figure out how to exclude directories and or files from the XCopy routine.

It turned out to be pretty easy.

I basically have 2 text files.  RunBackup.cmd and MyExcludes.txt
They both reside in the same folder. 
The RunBackup.cmd text file has just the following line in it (all one line no line breaks):

xcopy /E /Y “C:\MySourceDirectory\subdirectory” “G:\MyDestinationDirectory\subdirectory\” /EXCLUDE:MyExcludes.txt

The MyExcludes.txt has the following line in it:


So this backs up everything in the source directory including subdirectories to the destination directory but excludes anything in a directory called \Storage and all sub-directories and files below that.

You can also put (each on a seperate line) things like:


That would do the same as above but also exclude any .doc and .pdf files from any directories in the source.
Tested on Windows 7 Professional.


Firefox keyboard shortcuts and tips

This is just a refresher for myself.  I’ve started using Firefox Beta 4.0b1 without the menu bar and navigation bar for a very minimalist view.
Using it this way makes keyboard shortcuts that much more important for efficient browsing.

Go to your default search engine = ctrl & k
Go to a URL = ctrl & l
Open the downloads sidebar = ctrl & j
Go to your home page = alt & home
Find in the current page = ctrl & f

To set your default search engine to something else: hit ctrl & l, type about:config.
search for and change it to whatever you want, in my case Bing.


Transformers 3 explosions video

Video of a scene from Transformers 3 that is being shot some in Chicago.  You can’t really see the set to well, but if you look at my pictures in the previous post you can get an idea as to what’s going on.
We had hoped to be closer when they started actual filming but they kept pushing us back farther and farther.

6 weeks 20 pounds

This is a chart of my weight loss that I started June 8th.
This coming Tuesday the 20th will mark 6 weeks and a drop of 20 pounds.
The small blue and white diamonds are the actual weight readings.  The red line is the trend line.

I haven’t done any exercise, I took information from The Hacker’s Diet and kinda took an extreme approach to eating less calories than I burn.
I am going to start doing the exercise program laid out in the Hacker’s Diet which is actually meant for getting fit not losing weight.

The first thing I did was cut out all soda, period.  No diet soda or anything.  I have only drank water with the Crystal Light flavoring packets (they are only 5 calories).
When I did eat I  just ate in small quantities and avoided obviously high calorie things like Krispy Kreme doughnuts and boxes and boxes of candy like I normally would eat.
For the first 2 or 3 weeks my daily calorie intake was roughly 600 calories.
Now, don’t start saying “that’s not healthy, you are starving yourself….” I’ve heard it all and ignored it all.
I was keenly aware of what my body was telling me and was watching out for adverse affects.I’m no doctor but the only adverse affect I noticed was constant hunger all day long, which is kinda annoying but livable.
Over the past 2 to 3 weeks I’ve slowing increased my calories to a whopping 900 to 1000.
Beginning later next week I’ll be slowly increasing up to roughly 2000 or whatever works best to maintain my weight.

Not everyone can do an extreme diet like this but it certainly worked for me, now for the hard part of maintaining this weight.

  • Taken: 17 July, 2010

Sharepoint runtime error: “The browser or gateway element with ID ‘SKTDevicesSamSung’ cannot be found”

Sharepoint started erroring out and wouldn’t load today.  I had made a couple of changes to the server so I wasn’t sure which one had caused the problem.

After turning off custom errors so I could see the details, the error was: “Error: The browser or gateway element with ID ‘SKTDevicesSamSung’ cannot be found”

Right away I knew what did it but not sure why.  I was playing with interpreting the user agent strings that various browsers send to your server when they make requests.
I don’t really need to know what browser, version and OS is hitting our intranet but it was fun figuring out how to do it.  Well I had run the aspnet_registerbrowsers.exe -i command which loads info from .browser files to help with identifying web browsers.  There’s a bug that causes sharepoint to choke on the SKTDevicesSamSung element of the compat.browser xml file.

To fix it find these files (I had 2 because of 64bit Server 2008).
They were in my folders below:

Following instructions from Microsoft had me delete the following lines from the compat.browser files:

<browser id=”InfrawareSamSung” parentID=”SKTDevicesSamSung”>
<browser id=”InfrawareLG” parentID=”SKTDevicesLG”>
<browser id=”InfrawareSKY” parentID=”SKTDevicesSKTT”>
<browser id=”InfrawareMotorola” parentID=”SKTDevicesMotorola”>

Remove these lines from the opening tag <browser…> including the line with </browser>.

After removing these lines I re-ran the aspnet_registerbrowsers.exe -i command (not sure if that’s necessary or not).
That fixed the issue.

Turn off iTunes backups of iPhone or iPad while syncing

I don’t normally re-post stuff I find on other news sites but this is an application I found on that sounded like a really good idea.

I rarely hook my iPad and iPhone up to my computer and sync with iTunes.  When I do I usually get aggravated because it has to go through a backup each time and it can take forever if it’s been awhile.
This little app turns off the backup part of syncing your iPad or iPhone.  It makes the sync time much less which is a good thing.
If I ever nuke my iPad or iPhone I never restore from backup because I like a totally clean device that I put back the stuff I use on it manually. 
I know it sounds silly but I’d rather it be a clean load without the crap I never use anyways.

Email multiple photos in IOS 4

While trying to figure out a different problem I found that you can email multiple photos from IOS 4.
Some of you might be saying, duh, but I just figured it out so hush.  This might even have been available in previous versions of the OS but I haven’t tested it to figure it out.

I’ve been just emailing one photo at a time by selecting a photo and then selecting the little box with an arrow icon.

When you are on the screen with the thumbnails of your photos hit the little box with an arrow in the upper right hand corner which allows you to select multiple photos.
After you select those you want to email hit the share button (on the iPad it says email not share).  This opens a new email with the selected photos in it.

It’s a silly thing but something I’ve wanted to do for awhile.

My original problem is that the photos that are emailed are not situated in portrait mode even if you take the picture in portrait mode.
So all of these photos end up rotated to the left when I post them to Facebook and to my website.  I’m still looking for a solution to this one.
If anyone knows of a fix let me know!

Set the value and text of a bulleted list using Hyperlink mode from VB.NET code behind

I love the internet.  All of the answers to life are on the internet if you take enough time to look.
Not only are the answers to life’s big questions out there, like what happens when I die?
But also the answers to things like how on earth do I set the value (what’s not seen and in my case was a URL) and the text (what’s seen) of a bulleted list that is being displayed in Hyperlink mode?

It took a little while and I finally found something that looked like the answer but it was in C#, which I know pretty much nothing about.
But there’s this handy website that can convert C# code to VB.NET.

So here it is (from, another valuable website):

Dim objListItem As New ListItem()
For i As Integer = 0 To 9
objListItem.Value = YourURLStringValueHere
objListItem.Text = YourDisplayTextStringValueHere
BulletedList1.DisplayMode = BulletedListDisplayMode.HyperLink

The loop is just there for explanation purposes.  In my case the loop was a set of data from a SQL connection.

Whew, ok I’m going to bed now that this is figured out.

ASP.Net Popup window from a hyperlink within Gridview results that passes 2 parameters

I spent a fair amount of time nailing this one down so I figured I’d better record it for future reference.

From within your gridview section add your columns and change one of the columns to a template then you can manipulate what shows up for that column.

<asp:HyperLink ID=”HyperLink1″ runat=”server” Font-Underline=”True”
NavigateUrl=<%# String.Format(“javascript:void(‘http://intranet/somepage.aspx?parameter1=” & Eval(“gridviewColumnName1”) & “&parameter2=” & Eval(“gridviewColumnName2”) &  
“‘,’_blank’,’width=750,height=700,toolbar=no,status=yes,scrollbars=yes,resizable=no’))”, Eval(“gridviewColumnName1”)) %>
Text='<%# Bind(“gridviewColumnName1”) %>’></asp:HyperLink>

What you end up with is a hyperlink that looks something like this:


So the hyperlink will popup a window and take you to your specified page and passes 2 parameters to the page that can then be acted upon.

Hopefully this makes sense.  It does to me right now, but who knows when I come back to it later!  :)

Note:  many times when you copy and paste this sort of code into your environment you’ll have to change the apostrophes because they get replaced with a backwards apostrophe which will cause problems.