Sep
04
2009
0

Moving emails from Mac Mail back to Outlook on Windows

Although both Apple and Microsoft say it’s easy moving between their platforms, things aren’t as easy as they seem.

You can struggle for hours trying to move your data. I’ve tried conversion tools and some emails always fail. The best method is to take advantage of IMAP, which will let you store emails on a server, then download them again.

If your ISP doesn’t give you an IMAP account, there are Lots of webmail providers such as gmail can give you an IMAP account.

Once you’re set up, just drag the emails into the IMAP folder and they will upload to the server.

Now, just configure your new client and download the emails. Done!

If you are worried about privacy, you can download and install hmailserver, create an account on that and then just send the messages to your local server.

Written by John Burns in: Mac OS X Tips,PC Tips |
Aug
26
2009
0

No more Windows Live Messenger for Windows Server 2003

Microsoft just upgraded Live Messenger.

If you happen to use Windows Server 2003 as your operating system of choice – As a lot of web developers do, you are now out of luck using Windows Live Messenger.

As of yesterday, you are forced to upgrade Live Messenger to the latest and greatest version, which um, er, doesn’t support Windows Server 2003. You’ll either need to upgrade to Server 2008, or downgrade to an older version Windows Messenger instead of Live.

Yes, we understand, Server is meant to be used as a server, but a lot of people use it as their main OS.

Microsoft really overlooked this one…

Written by John Burns in: General Randomness,PC Tips |
Jul
09
2009
0

Serving Google KML and KMZ files from IIS

By default, Microsoft IIS only supports a small number of files. This is what you need to support KML and KMZ files in IIS.

The MIME type details are:

Extension: .kml
MIME type: application/vnd.google-earth.kml+xml

Extension: .kmz
MIME type: application/vnd.google-earth.kmz

If you need to know what to do with these mime types, I have a step by step guide for setting up RSS files at http://www.john.geek.nz/index.php/2009/06/supporting-rss-files-in-iis/ – Just use the different extensions and mime types.

Written by John Burns in: General Randomness,PC Tips |
Jun
16
2009
0

Erasing a drive that shows as "Healthy (GPT Protective Partition)"

I’ve recently pulled a drive out of Windows Server 2003 and tried to use it in Windows XP.

When connected, it shows up as “Healthy (GPT Protective Partition)”. I can’t assign a drive letter to it, format it or even repartition it.

Firstly, if this had data on it, you’ll need to go back to Windows 2003 or use a Linux Boot CD to extract it.

If all you’re trying to do is format it for use in Windows XP, read on….
(more…)

Written by John Burns in: PC Tips |
Jun
15
2009
1

Supporting RSS Files in IIS

Microsoft IIS does not support RSS files by default. Here is a step by step guid eto enabling it.

If you’re impatient, already know your way around IIS and just want the MIME type details, they are:
Extension: .rss
MIME type: application/rss+xml

Otherwise, if you need more information, read on…..
(more…)

Written by John Burns in: PC Tips |
Jun
15
2009
0

Sandisk Cruzer – Making them work like a standard USB stick

I just brought an 8GB Sandisk Cruzer USB stick. Unfortunately whenever you plug it in, it comes up as both an emulated CD-ROM drive and the removable disk. the emulated disk comes up as “U3 System” and it tries to run backup/sync software called U3 Launchpad.

Some people enjoy these extra “benefits”, but I’m not a big fan of the bundled software and just want 8GB of storage space I can call home.

If you want to remove the built in software and just use it as a memory stick, you’ll want to use the U3 LaunchPad Remover from Sandisks’ Website. The link to it is: http://www.sandisk.com/driverdownload/download.asp?driverId=2

Written by John Burns in: General Randomness,Mac OS X Tips,PC Tips |
May
05
2009
0

Testing websites with multiple versions of IE

One of the most annoying tasks I have to do when I’m developing a website is to test it in the many different browsers and in some cases, multiple versions of each.

Internet Explorer is the most difficult to test. Windows typically only allows one version of IE to be installed and no two versions will render a page the same. Add to this the frustration that a huge percentage of users still use Internet Explorer version 6 (Come on people, IE6 will be 8 years old this August!) and you’ve got a real problem on your hands.

Until now….
(more…)

Written by John Burns in: CSS tips,PC Tips |
Apr
25
2009
0

Deleting files based on their Date

If you are perfoming regular automated backups (like you should), You’ll soon find you are running out of space and need to start deleting old backups.

Here is a really simple way to delete files that are more than x days old.

It can easily be worked into a batch file to be run at the same time as an automated backup.


Forfiles -p c:\path -s -m *.* -d -14 -c "cmd /c del /q @path"

Change the *.* to a more specific file mask (eg: backup*.zip). The 14 specifies files older than 14 days, so change this to suit your purposes.

If you want to check what files will be deleted, this will display them:

Forfiles -p c:\path -s -m *.* -d -14 -c "Cmd /C Echo 0x22@Path\@File0x22"

Written by John Burns in: General Randomness,PC Tips |
Nov
26
2008
0

Backing up SVN to a Zip File

I promised in my post about getting a UTC Formatted Date and Time from the command line that I would give some tips about using it for backups.

I use my dateTimeUTC command line application I wrote about and 7-zip which is an open source command line zip utility.

First of all, I backup to my d drive into a directory (folder) called backups.

The command line tool SVNADMIN has a hotcopy option which makes a copy of the entire Repository to a new location without having to stop the SVN service.

So the first step I do is delete the COPY of the Repository (if it exists), then make a new copy if it.

IF EXIST "d:\backups\SVN\SVN_Repos" RMDIR /S /Q "d:\backups\SVN\SVN_Repos"
MKDIR "d:\backups\SVN\SVN_Repos"

SVNADMIN hotcopy D:\SVN_Repos D:\backups\SVN\SVN_Repos --clean-logs

We now have a complete copy of the repository in D:\backups\SVN\SVN_Repos.

Now, using my datetimeUTC tool, I set a variable to the value of the filename I want to use

for /f "usebackq" %%a in (`datetimeUTC.exe yyyyMMddTHHmmssZ`) do (set UTCdts=%%a%)
SET newfile=Backup.SVN.%UTCdts%.zip

The variable %newfile% now contains something like “Backup.SVN.20081126T133505Z.zip”

Just in case it exists, I attempt to delete this file

del d:\backups\SVN\%newfile%

I then compress the entire folder using 7-zip.

7z.exe a -mx=9 -tzip -r d:\backups\SVN\%newfile% d:\backups\SVN\SVN_Repos

Calling 7z by itself will give you the options, but the options I use are:
a : Add files to archive
-mx=9 : Use maximum compression (5 is default)
-tzip : Set type of archive to zip
-r : Recurse subdirectories

Then, at the end, delete the COPY of the SVN Repository

IF EXIST "d:\backups\SVN\SVN_Repos" RMDIR /S /Q "d:\backups\SVN\SVN_Repos"

You can test the zip file for errors using

7z.exe t d:\backups\SVN\%newfile%

Directly after the test command, the parameter %ERRORLEVEL% will return a non zero result if there was any error.

I’ll post another log soon on how to email logs from the command line when errors are detected. In the mean time, set up scheduled tasks to run a batch file do complete your backing up processes.

And remember the golden rule which goes something along the lines of “If you’ve never restored a backup, you may as well not have a backup”.

Written by John Burns in: PC Tips |
Nov
21
2008
0

Easy Formatted UTC Dates from the Command line – PC

I’ve been using the command line to backup my files for a long time, but always used the date and time tools that ship with windows. the way I used to do it was like this (Sorry, long lines won’t wrap).

for /f "tokens=1,2,3,4* delims=/ " %%a in ('date /t') do set newdate=%%c%%b%%a
for /f "tokens=1,2,3,4* delims=: " %%a in ('time /t') do set newtime=%%a%%b
SET timestamp=%newdate%%newtime%
ECHO %timestamp%

This was delimiting the results from the date with a slash and delimiting the time with a colon.

This approach always had two problems for me:

  • The date and time was always the local system time
  • The date format (DD/MM or MM/DD) was based on the user running the script
  • Some locales format the date and time with different delimiters

Anyway, I finally decided I had enough with this solution and wrote a quick and dirty console application in C#.

It’s called datetimeUTC. Download it from here – If you install it in c:\windows\system32 you can call it from anywhere on the command line. It’ll need the .NET framework too.

Just call it without any arguments for the help. This is what you’ll see…

C:\>datetimeUTC
Returns a UTC date time value to a specified format

datetimeUTC [format]

Example formats:
yyyyMMddTHHmmssZ                20081121T100227Z
"yyyy-MM-dd HH:mm:ss UTC"       2008-11-21 10:02:27 UTC
"dd MMMM yyyy"                  21 November 2008
ddd                             Fri
dddd                            Friday
fff                             (Milliseconds)

Use double quotes when the format includes a space
Use backslashes to escape reserved characters

By: John Burns (www.john.geek.nz)
License: Free for any use

C:\>

Known bugs

  • You can’t use double quotes in the middle of the format.
  • You cannot get a backslash in the output as its the escape character

In a batch file, you can get the output from it like this.

for /f "usebackq" %%a in (`datetimeUTC.exe yyyyMMddTHHmmssZ`) do (set UTCdts=%%a%)
ECHO %UTCdts%

Using the above script allows you to compress backups using an accurate UTC time stamp.

I’ll write another post soon about how I compress and auto email the files.

Written by John Burns in: PC Tips |