private void upload(File source) throws Exception {
		
		if (source.isDirectory()) {
			String[] list = source.list();

			for (int index = 0; index < list.length; index++) {
				File newSource = new File(source, list[index]);
				upload(newSource);
			}
			if (count.containsKey("Directory")) {
				count.put("Directory", Integer.sum(count.get("Directory").intValue(),1));
			} else {
				count.put("Directory", 1);
			}
			System.out.println(count);	
		} else {
			
			StringTokenizer st = new StringTokenizer(source.getParent(), " /-");
			
			Collection<String> tags = new ArrayList<String>();
			while (st.hasMoreElements()) {
				tags.add(st.nextElement().toString());
			}
			tags.add("Importado"+tagTime);
			
			String mimeType = Files.probeContentType(Paths.get(source.getPath()));
			
			
			if (count.containsKey(mimeType)) {
				count.put(mimeType, Integer.sum(count.get(mimeType).intValue(),1));
			} else {
				count.put(mimeType, 1);
			}
			System.out.println(count);
			
			String contentType;
			if (mimeType.equals("image/jpeg")) {
				contentType = Flickr.CONTENTTYPE_PHOTO;
			} else {
				contentType = Flickr.CONTENTTYPE_OTHER;
			}

			if (mimeType.equals("image/jpeg") || mimeType.equals("video/mpeg") || mimeType.equals("video/quicktime")) {
				Upload up = new Upload();
				up.execute(source, tags, contentType, mimeType);
			}
			
			System.out.println(count);
		}	
	}