diff --git a/delete_all.module b/delete_all.module
index f453f02..6d1c527 100644
--- a/delete_all.module
+++ b/delete_all.module
@@ -109,9 +109,9 @@ function delete_all_content() {
     'method' => array(
       '#type' => 'radios',
       '#title' => t('Method'),
-      '#options' => array('normal' => t('Normal'), 'quick' => t('Quick')),
+      '#options' => array('normal' => t('Normal'), 'quick' => t('Quick'), 'batch' => t('Batch API')),
       '#default_value' => 'normal',
-      '#description' => t('Normal node delete calls node_delete() on every node in the database.  If you have only a few hundred nodes, this can take a very long time.  Use the quick node delete method to get around this problem.  This method deletes directly from the database, skipping the extra php processing.  The downside is that it can miss related tables that are normally handled by module hook_delete\'s.'),
+      '#description' => t('Normal node delete calls node_delete() on every node in the database.  If you have only a few hundred nodes, this can take a very long time.  Use the quick node delete method to get around this problem.  This method deletes directly from the database, skipping the extra php processing.  The downside is that it can miss related tables that are normally handled by module hook_delete\'s. Batch API will perform node_delete() on each node using Drupal\s Batch API ensuring the process will not stop due to memory limits or time outs.'),
     ),
   );
   $form['submit'] = array(
@@ -205,8 +205,14 @@ function delete_all_content_confirm_submit($form, &$form_state) {
       }
       $count = _delete_all_quick($types);
       break;
+
   }
 
+  // If the user has chosen Batch API, call the init function now. We don't put this in above switch because the batch API needs some pages to be loaded so drupal_goto() won't execute at all. 
+  if ($form_state['values']['method'] == 'batch'){
+      delete_all_batch($form_state['values']['all'], $types);
+	}
+	
   if ($form_state['values']['all']) {
     // Delete the URL aliases
     db_query("DELETE FROM {url_alias} WHERE source LIKE 'node/%%'");
@@ -218,6 +224,8 @@ function delete_all_content_confirm_submit($form, &$form_state) {
   }
 
   drupal_goto('admin');
+  
+
 }
 
 function _delete_all_normal($all, $types) {
@@ -324,6 +332,59 @@ function _delete_all_quick($types) {
   return $deleted;
 }
 
+
+function delete_all_batch($all, $types) {
+  if(is_array($types) && count($types) > 0) {
+    foreach ($types as $type) {
+      $result = db_query(
+        'SELECT nid FROM {node} WHERE type = :type', 
+        array(':type' => $type)
+      );
+    }
+  }
+  else {
+    $result = db_query(
+      'SELECT nid FROM {node}'
+    );
+  }
+  
+  if($result) {
+  // Prepare the batch function.
+    $batch = array(
+    'title' => t('Deleting Content...'),
+    'operations' => array(),
+    'init_message' => t('Starting...'),
+    'progress_message' => t('Processed @current out of @total.'),
+    'error_message' => t('An error occurred during processing'),
+    'finished' => 'delete_all_batch_finished',
+    'progressive' => FALSE,
+  );
+	foreach ($result as $data) {
+		$batch['operations'][] = array('delete_all_batch_worker', array($data->nid));
+		// node_delete($data->nid);
+	}
+	batch_set($batch);
+	batch_process('admin');
+  }
+}
+
+function delete_all_batch_worker($nid, &$context) {
+if (is_numeric($nid)) {
+  node_delete($nid);
+  $context['results']['processed']++;
+  $context['message'] = $nid;
+ }
+}
+function delete_all_batch_finished($success, $results, $operations) {
+  if ($success) {
+    $message = format_plural($results['processed'], 'One node deleted.', '@count nodes deleted.');
+  }
+  else {
+    $message = 'Errors occured';
+  }
+   drupal_set_message($message);
+}
+
 function delete_all_users() {
   $form = array();
   return confirm_form(
