@Override
	protected void run() throws Exception {
		File file = askFile("Select FID database file to repack","OK");
		PackedDatabase pdb;
		pdb = PackedDatabase.getPackedDatabase(file, false, TaskMonitor.DUMMY);
		DBHandle handle = pdb.open(TaskMonitor.DUMMY);
		File saveFile = askFile("Select name for copy","OK");
		PackedDBHandle newHandle = new PackedDBHandle(pdb.getContentType());

		Table[] tables = handle.getTables();
		for(int i=0;i<tables.length;++i) {
			long transactionID = newHandle.startTransaction();
			copyTable(tables[i],newHandle);
			newHandle.endTransaction(transactionID, true);			
		}
		newHandle.saveAs(pdb.getContentType(), saveFile.getParentFile(),saveFile.getName(), TaskMonitor.DUMMY);
		newHandle.close();
	}
Copy a single table between databases
@param oldTable is the old table to copy
@param newHandle is the handle to the new database receiving the copy
@throws IOException
@throws CancelledException
Ghidra/Features/FunctionID/ghidra_scripts/RepackFid.java