public static void copyFolder(File src, File dest)
	{
		try
		{
			if(src.isDirectory())
			{

				if(!dest.exists())
				{
					dest.mkdir();

					System.out.println("Directory copied from " + src + "  to " + dest);
				}

				String files[] = src.list();

				for(String file : files)
				{
					File srcFile = new File(src, file);
					File destFile = new File(dest, file);

					copyFolder(srcFile,destFile);
				}
			} else {
				InputStream in = new FileInputStream(src);
				OutputStream out = new FileOutputStream(dest);

				byte[] buffer = new byte[1024];

				int length;

				while ((length = in.read(buffer)) > 0)
				{
					out.write(buffer, 0, length);
				}

				in.close();
				out.close();

				System.out.println("File copied from " + src + " to " + dest);
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}