private static void dirCopy(File sourcePath , File targetPath)
    {
	try
	{
	    if (sourcePath.isDirectory()) 
	    {
		if (!targetPath.exists()) { targetPath.mkdir(); }

		String[] children = sourcePath.list();

		for (int i=0; i<children.length; i++) 
		{
		    dirCopy(new File(sourcePath, children[i]),new File(targetPath, children[i]));
		}
	    } 
	    else 
	    {
		InputStream in = new FileInputStream(sourcePath);
		OutputStream out = new FileOutputStream(targetPath);

		// Copy the bits from in stream to the out stream
		byte[] buf = new byte[1024];
		int len;

		while ((len = in.read(buf)) >= 0) { out.write(buf, 0, len); }
		in.close();
		out.flush();
		out.close();
	    }
	}
	catch (Exception e){ }
    }