diff --git a/imce_rename.module b/imce_rename.module
index f51ea8d..b719033 100644
--- a/imce_rename.module
+++ b/imce_rename.module
@@ -70,6 +70,7 @@ function imce_rename_file($old_filename, &$imce, $new_filename) {
   }
 
   $old_filepath = $dirpath .'/'. $old_filename;
+  $old_filepath_orig = $old_filepath;
   $new_filepath = $dirpath .'/'. $new_filename;
   
   $move = file_move($old_filepath, $new_filepath, FILE_EXISTS_ERROR);
@@ -90,6 +91,34 @@ function imce_rename_file($old_filename, &$imce, $new_filename) {
     imce_add_file($file, $imce);
     imce_remove_file($old_filename, $imce);
     drupal_set_message(t('Rename successful! Renamed "@old_file" to "@new_file"', array('@old_file' => utf8_encode($old_filename), '@new_file' => utf8_encode($new_filename))));
+
+    // Use path_redirect to preserve the old file name.
+    if (module_exists('path_redirect')) {
+      // If the new file path supercedes a redirect, delete the redirect.
+      $redirect = path_redirect_load_by_source($new_filepath);
+      if ($redirect !== FALSE) {
+        if (path_redirect_delete_multiple(array($redirect['rid']))) {
+          drupal_set_message(t('Removed old redirect from "@new_file".', array('@new_file' => utf8_encode($new_filepath))));
+        }
+        else {
+          drupal_set_message(t('Unable to remove old redirect from "@new_file".', array('@new_file' => utf8_encode($new_filepath))));
+        }
+      }
+      // Redirect the old path to the new path.
+      if (FALSE === path_redirect_load_by_source($old_filepath)) {
+        $redirect = array(
+          'redirect' => $new_filepath,
+          'source' => $old_filepath_orig,
+        );
+        path_redirect_save($redirect);
+        if (!$redirect['rid']) {
+          drupal_set_message(t('Failed to redirect file "@old_file" to "@new_file".', array('@old_file' => utf8_encode($old_filepath), '@new_file' => utf8_encode($new_filepath))));
+        }
+        else {
+          drupal_set_message(t('Now redirecting file "@old_file" to "@new_file".', array('@old_file' => utf8_encode($old_filepath), '@new_file' => utf8_encode($new_filepath))));
+        }
+      }
+    }
   }
   else {
     drupal_set_message(t('Failed to rename file "@old_file" to "@new_file" because "@new_file" already exists', array('@old_file' => utf8_encode($old_filename), '@new_file' => utf8_encode($new_filename))));
