Adding an existing file to the File records
It may be easiest to create a special directory to receive these incoming files.
For example, if the directory is /var/www/sites/all/files/inbound then your code could do the following to scan the directory for new files and move them to the cms storage system:

  global $user;
  $new_files = (array) glob('/var/www/sites/all/files/inbound/*');
  foreach ($new_files as $filename) {
    $uri = file_unmanaged_move($filename);
    // Create a file object.
    $file = new stdClass();
    $file-&gt;fid = NULL;
    $file-&gt;uri = $uri;
    $file-&gt;filename = drupal_basename($uri);
    $file-&gt;filemime = file_get_mimetype($file-&gt;uri);
    $file-&gt;uid = $user-&gt;uid;
    $file-&gt;status = FILE_STATUS_PERMANENT;
    file_save($file);
  }


If you want to run this periodically then you can add the above to an implementation of hook_cron.