Thursday, June 19, 2008

Copy all files from a root dir to another directory

I had the need to copy all files of type .m4a from literally hundreds of subdirectories to a single directory. I tried and failed with XCopy so decided to roll my own utility.

So 10 minutes and some C# hackery later, SubCopyX was born. Feel free to hack and slash the code to your hearts content. If you do use it in anger or have suggestions, then let me know at : james at softwarex dot co dot nz

.NET 2.0 required to run.

Source here
Binary here

Usage:

from the commandline type:
SubCopyX
for example:
SubCopyX c:\Music d:\Music *.mp3

to copy all your mp3 files under the root dir c:\Music to a single directory called d:\Music

The following wildcard specifiers are permitted in searchPattern.

Wildcard character

* Zero or more characters.

? Exactly zero or one character.

Characters other than the wildcard specifiers represent themselves. For example, the searchPattern string "*t" searches for all names in path ending with the letter "t". The searchPattern string "s*" searches for all names in path beginning with the letter "s".

Note:

When using the asterisk wildcard character in a searchPattern, such as "*.txt", the matching behavior when the extension is exactly three characters long is different than when the extension is more or less than three characters long. A searchPattern with a file extension of exactly three characters returns files having an extension of three or more characters, where the first three characters match the file extension specified in the searchPattern. A searchPattern with a file extension of one, two, or more than three characters returns only files having extensions of exactly that length that match the file extension specified in the searchPattern. When using the question mark wildcard character, this method returns only files that match the specified file extension. For example, given two files, "file1.txt" and "file1.txtother", in a directory, a search pattern of "file?.txt" returns just the first file, while a search pattern of "file*.txt" returns both files.

The following list shows the behavior of different lengths for the searchPattern parameter:

* "*.abc" returns files having an extension of .abc, .abcd, .abcde, .abcdef, and so on.
* "*.abcd" returns only files having an extension of .abcd.
* "*.abcde" returns only files having an extension of .abcde.
* "*.abcdef" returns only files having an extension of .abcdef.

Tuesday, June 10, 2008

Post Keynote coverage

If you've been living under a rock you won't know that Apple has announced a 3G iPhone to be released in 22 countries (including NZ) on July 11.

It does have GPS and 3G, but otherwise it is fairly similar to the old one. The case is a little different and there is a white one available in the 16Gb model.

Big news is the price. Each carrier it appears, has there own deal available, but the maximum the phone will be is $199US. Compared to $599 last year this is great news.

In the UK for example, O2 has announced the tariffs. The maximum you will pay is £99 with the £30/month deal and it will be free for anything over the £45/month tariff. Oh, and they will be offering a Pay and Go iPhone also. It looks like 2008 will be the year of the iPhone. Big things ahead, especially with the AppStore opening soon.

The only other thing of note announced was MobileMe, which is a rebranding of .Mac. I haven't looked into it too much yet, but info is available Here

Also the next version of OSX was announced. 10.6 or Snow Leopard is to be available next year and is to concentrate on performance and reducing the foot print of the OS. I guess they are taking lession learnt from the iPhone and applying to the desktop OS. Hate the name, but like the idea of an even snappier OSX.

I was hoping to see some kind of incentive for Windows devs to get a mac and develop for the iPhone, but nothing was announced. I guess going forward Apple believes there is enough interest already, and I guess they are right. The have over 4000 developers signed up for the program with over 250,000 applying.

Intersting times to be an Apple developer I think...

Monday, June 09, 2008

WWDC Predictions

Another Apple event, another round of predictions. So without any further fanfare here they are:

1) 3G iPhone - well duh! I am also predicting that the phone will be available as of tomorrow, or at worst in the next week or two. Not expecting a GPS to be in built - hoping for better camera.
2) AppStore to be announced but not ready. I would expect it to be ready by the end of the month. I would be surprised if it will be ready today. The SDK is still not ready for primetime IMHO.
3) Apple want people developing for iPhone - that is a given. The only way at the moment is via a Mac. So look for some reason for Windows devs to develop for the iPhone. Not 100% sure what, maybe a cheaper machine, or maybe XCode for Windows.
4) A new range of iPhones. Am hoping for a bigger tablet style iPhone, but am thinking probably just different color ranges.

So that's my list - lets see how it goes.

Sunday, June 08, 2008

iStat Menu

I have just found out about iStat Menus. I used to have this sort of monitoring in the Windows days and it's great to have similar in OSX.

It can monitoring all important system activities, such as CPU usage, CPU temp, CPU usage, network activity, to name a few.

Also it makes you look like an uber geek with such a cramped menu bar!

Donationware so just download and try