diff --git a/includes/file.inc b/includes/file.inc
index 40e8349..13be755 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -842,13 +842,15 @@ function file_valid_uri($uri) {
  *   - FILE_EXISTS_RENAME - Append _{incrementing number} until the filename is
  *       unique.
  *   - FILE_EXISTS_ERROR - Do nothing and return FALSE.
+ * @param $move
+ *   A bool that, if true, makes this function move instead of copy the file.
  *
  * @return
  *   The path to the new file, or FALSE in the event of an error.
  *
  * @see file_copy()
  */
-function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXISTS_RENAME) {
+function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXISTS_RENAME, $move = FALSE) {
   $original_source = $source;
   $original_destination = $destination;
 
@@ -905,8 +907,10 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST
   }
   // Make sure the .htaccess files are present.
   file_ensure_htaccess();
+  
   // Perform the copy operation.
-  if (!@copy($source, $destination)) {
+  $result = ($move ? @rename($source, $destination) : @copy($source, $destination));
+  if (!$result) {
     watchdog('file', 'The specified file %file could not be copied to %destination.', array('%file' => $source, '%destination' => $destination), WATCHDOG_ERROR);
     return FALSE;
   }
@@ -1066,10 +1070,7 @@ function file_move(stdClass $source, $destination = NULL, $replace = FILE_EXISTS
  * @see file_move()
  */
 function file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME) {
-  $filepath = file_unmanaged_copy($source, $destination, $replace);
-  if ($filepath == FALSE || file_unmanaged_delete($source) == FALSE) {
-    return FALSE;
-  }
+  $filepath = file_unmanaged_copy($source, $destination, $replace, true);
   return $filepath;
 }
 
