public static void main(String[] args) {
		// if the directory does not exist, create it
		File folderout = new File("batchusenix-pdef");
		if (!folderout.exists())
		{
			folderout.mkdir();
		}

		File folder = new File("batch");
		if (!folder.exists())
		{
			System.out.println("Batch folder needs to exist");
			System.exit(0);
		}

		String fold = "batch/";
		int count = 0;

		for(int site=0; site <= NUM_SITES; site++)
		{
			System.out.println(site);
			for(int inst=0; inst <= NUM_INSTANCES; inst++)
			{
				count = count+1;
				
				String file1 = fold + site + "-" + inst;
				ArrayList<Packet> packetList = extractPacketsInfo(file1);
				
				String file2 = fold + "" + count;
				packetList.addAll(extractPacketsInfo(file2));
				
				Collections.sort(packetList, new PacketComparator());
				
				String outFile = folderout+""+site+"-"+inst;
				writePacketsInfo(outFile, packetList);
			}
		}
	}