Migrate files from directory to Drupal using Migrate I have a folder with a large amount of files in. I need to migrate this into Drupals file system so I can then reference them in the content.

The ID of the file is the actual name e.g. 1234.jpg

What's the best method of doing this? I think I have the destination method set using MigrateDestinationFile()

I could write a script to create an xml document which defines every file in the folder and then extend the XMLMigration class and use that but it seems a bit overkill? Are there any source methods that would help with this?
If you are now using migrate_extras to set media as destination, you can take a look to the following links:


An useful example to import images using media as destination
A thread on drupal.org that deals a question very similar to yours