function file_unmanaged_move


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
cle7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
elmsmedia7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
icor7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
meedjum_blog7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
mooc7 file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)

Moves a file to a new location without database changes or hook invocation.


$source: A string specifying the filepath or URI of the original file.

$destination: A string containing the destination that $source should be moved to. This must be a stream wrapper URI. If this value is omitted, Drupal's default files scheme will be used, usually "public://".

$replace: Replace behavior when the destination file already exists:

Return value

The URI of the moved file, or FALSE in the event of an error.

See also


Related topics

17 calls to file_unmanaged_move()
backup_migrate_destination_files::_save_file in sites/all/modules/ulmus/backup_migrate/includes/
File save destination callback.
BaconmockupProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/BaconmockupProvider.class.php
Image generation handler.
ctools_stylizer_image_processor::command_slice in sites/all/modules/ulmus/ctools/includes/
Take a slice out of the current workspace and save it as an image.
devel_generate_image in sites/all/modules/ulmus/devel/devel_generate/
Private function for creating a random image.
devel_generate_textfile in sites/all/modules/ulmus/devel/devel_generate/
Private function for generating a random text file.

... See full list


includes/, line 1103
API for handling file uploads and server file management.


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;
  return $filepath;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.