private static void doUnarchive() throws MVDException
	{
		try
		{
			if ( archiveName == null )
				throw new MVDToolException("No archive folder specified!");
			File archiveDir = new File( archiveName );
			File guideFile = new File( archiveDir, XMLGuideFile.GUIDE_FILE );
			if ( !guideFile.exists() )
				throw new MVDToolException("No guide file found in "
						+guideFile.getAbsolutePath());
			// create empty MVD
			if ( mvdFile == null )
				throw new MVDToolException("No MVD file name supplied!");
			XMLGuideFile guide = XMLGuideFile.internalise( guideFile );
			MVD mvd = new MVD();
            mvd.setDirectAlign( directAlignOnly );
			mvd.setDescription( guide.getDescription() );
			// go through the files, adding versions to the MVD
			String[] files = guide.getVersionFileNames();
			for ( int i=0;i<files.length;i++ )
			{
				short vId = (short)(i+1);
				File versionFile = new File( archiveDir, files[i] );
				if ( !versionFile.exists() )
					throw new MVDToolException("File "+files[i]+" not found!");
				FileInputStream fis = new FileInputStream( versionFile );
				byte[] data = new byte[(int)versionFile.length()];
				fis.read( data );
				fis.close();
				XMLGuideFile.VersionInfo vi = guide.getVersionInfo( vId );
				mvd.newVersion( vi.shortName, vi.longName, 
					guide.getGroupName(vi.group), 
					vi.backup, vi.backup!=Version.NO_BACKUP );
                char[] chars = Utilities.bytesToChars(data,mvd.getEncoding());
				mvd.update( vId, chars, mergeSharedVersions );
			}
			MVDFile.externalise( mvd, new File(mvdFile), 
				folderId, Utilities.loadDBProperties(dbConn) );
		}
		catch ( Exception e )
		{
			throw new MVDException( e );
		}
	}