diff --git a/drealty.module b/drealty.module
index 574027c..4a50fed 100644
--- a/drealty.module
+++ b/drealty.module
@@ -1010,6 +1010,9 @@ function drealty_ctools_plugin_type() {
   );
 }
 
+/**
+ * Implements hook_pathauto().
+ */
 function drealty_pathauto($op) {
   switch ($op) {
     case 'settings':
@@ -1019,7 +1022,8 @@ function drealty_pathauto($op) {
       $settings['groupheader'] = t('Drealty paths');
       $settings['patterndescr'] = t('Default path pattern (applies to all Drealty types with blank patterns below)');
       $settings['patterndefault'] = '';
-
+      $settings['batch_update_callback'] = 'drealty_pathauto_bulk_update_batch_process';
+      $settings['batch_file'] = drupal_get_path('module', 'drealty') . '/drealty.module';
 
       foreach (drealty_listings_get_types() as $type => $name) {
         $settings['patternitems'][$type] = t('Pattern for all @node_type paths', array('@node_type' => $name->label));
@@ -1031,6 +1035,82 @@ function drealty_pathauto($op) {
 }
 
 /**
+ * Callback for pathauto batch processing.
+ */
+function drealty_pathauto_bulk_update_batch_process(&$context) {
+  set_time_limit(0);
+  if (!isset($context['sandbox']['current'])) {
+    $context['sandbox']['count'] = 0;
+    $context['sandbox']['current'] = 0;
+  }
+
+  $query = db_select('drealty_listing', 'd');
+  $query->leftJoin('url_alias', 'ua', "CONCAT('drealty_listing/', d.id) = ua.source");
+  $query->addField('d', 'id');
+  $query->isNull('ua.source');
+  $query->condition('d.id', $context['sandbox']['current'], '>');
+  $query->orderBy('d.id');
+  $query->addTag('pathauto_bulk_update');
+  $query->addMetaData('entity', 'drealty_listing');
+
+  // Get the total amount of items to process.
+  if (!isset($context['sandbox']['total'])) {
+    $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();
+
+    // If there are no listings to update, then stop immediately.
+    if (!$context['sandbox']['total']) {
+      $context['finished'] = 1;
+      return;
+    }
+  }
+
+  $query->range(0, 25);
+  $ids = $query->execute()->fetchCol();
+  drealty_update_alias_multiple($ids, 'bulkupdate');
+  $context['sandbox']['count'] += count($ids);
+  $context['sandbox']['current'] = max($ids);
+  $context['message'] = t('Updated alias for listing @nid.', array('@nid' => end($ids)));
+
+  if ($context['sandbox']['count'] != $context['sandbox']['total']) {
+    $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];
+  }
+}
+
+/**
+ * Update the URL aliases for multiple listings.
+ *
+ * @param $ids
+ *   An array of listing IDs.
+ * @param $op
+ *   Operation being performed on the listings ('insert', 'update' or
+ *   'bulkupdate').
+ * @param $options
+ *   An optional array of additional options.
+ */
+function drealty_update_alias_multiple(array $ids, $op, array $options = array()) {
+  $options += array('message' => FALSE);
+
+  $listings = drealty_listing_load_multiple($ids);
+  foreach ($listings as $listing) {
+    drealty_update_alias('drealty_listing', $listing, $op);
+  }
+
+  if (!empty($options['message'])) {
+    drupal_set_message(format_plural(count($ids), 'Updated URL alias for 1 Drealty listing.', 'Updated URL aliases for @count Drealty listings.'));
+  }
+}
+
+/**
+ * Implements hook_path_alias_types().
+ *
+ * Used primarily by the bulk delete form.
+ */
+function drealty_path_alias_types() {
+  $objects['drealty_listing/'] = t('Drealty listings');
+  return $objects;
+}
+
+/**
  * Implements hook_entity_insert() 
  */
 function drealty_entity_insert($entity, $entity_type) {
@@ -1064,13 +1144,13 @@ function drealty_update_alias($entity_type, $entity, $op) {
   }
 
 // Skip processing if the entity has no pattern.
-  $entity_info = entity_get_info($entity_type);
   list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
   if (!pathauto_pattern_load_by_entity($entity_type, $bundle)) {
     return;
   }
+  $entity_info = entity_get_info($entity_type);
 
   module_load_include('inc', 'pathauto');
   $uri = entity_uri($entity_type, $entity);
   pathauto_create_alias($entity_type, $op, $uri['path'], array($entity_info['token type'] => $entity), $bundle);
-}
\ No newline at end of file
+}
