public void deleteFolder(String bucket, List<String> listFolders) throws Exception{
        ListObjectsRequest listObjectsRequest;
        ObjectListing objectListing;            
       	for(String folderItem : listFolders){
        	if(!folderItem.trim().equalsIgnoreCase("/") && !folderItem.isEmpty()){
        try {
        		if(folderItem.startsWith("/")){
        		   folderItem = folderItem.substring(folderItem.indexOf("/")+1);
               	}
                
                listObjectsRequest = new ListObjectsRequest()
                    .withBucketName(bucket)
                    .withPrefix(folderItem);                
                do {
                    objectListing = s3.listObjects(listObjectsRequest);
                    for (S3ObjectSummary objectSummary : 
                    	objectListing.getObjectSummaries()) {
                    	s3.deleteObject(new DeleteObjectRequest(bucket, objectSummary.getKey()));
            		    fireEvent(new ipsilonS3ToolEvent(ipsilonS3ToolEvent.TYPE_DELETING,objectSummary.getKey()));		 	                         
                    }
                    listObjectsRequest.setMarker(objectListing.getNextMarker());
                } while (objectListing.isTruncated());
             } catch (AmazonServiceException ase) {
           	  throw new ipsilonS3ToolException(ase.getMessage(),ase);
            } catch (AmazonClientException ace) {
          	  throw new ipsilonS3ToolException(ace.getMessage(),ace);
            }
       	}
       }
    }