A new C# Project – or I Love C#

Do you do a lot of backing up to external drives? I have 3 300G USB external drives I use for my backing up. Trouble is I grab stuff from all over the place in my 6 drive File Server and it takes forever to get it copied across using Windows Explorer – tons of tedious “Are you sure you want to copy this read only file” and “There is already a file of this name, sure you want to copy it?” dialogs to click through (which usually take a while to get to as well) plus the actual copying is incredibly time consuming since everything is being recopied.

So I spent some time on the planes going to and from SF this week whipping up a C# app to do it for me. I can select what directories I want to copy from an explorer like directory dialog, set the destination and just press “go” and it _only_ copies that which has changed or is new. It even has a mode where it will clean up the destination and remove older files if they aren’t in the source tree – that one was a bit of feature creep, what can I say?

You can unselect directories lower in the directory hierarchy so you can get the copying to ‘skip’ directories (think of not having to copy all the output directories from an MS project for example) and it will pick up directories that are lower in the chain if those are marked.

You can even save out your configurations so you can reload at a later time and just press Go and it’ll work it all out for itself.

It’s not the _greatest_ C# code in the world – it works but it’s also pretty brute force, but then I’m a great believer in just getting stuff out there before making it pretty. I don’t do the copy on a separate thread for example so the dialog itself can freeze up if you are doing large file copies.

But it works and it’s sufficient for my needs right now.

Anyway, since I spent the time doing this, I thought some of the great unwashed might find this of interest, so I added it to my projects page – to go directly to it the link is here.

I think the fact that not only am I giving away the executable free, but also the C# source code is worthy of mentioning.

Anyway, hope you guys find it useful.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>