I would like to move (or copy) an attachment from the the "standard" uploads directory to another directory and at the same time make sure all the attachment metadata is updated to reflect the change in directory and all image sizes are created..
The 2 functions I would imagine would be:
move_attachment_file($attachment_id, $old_directory, $new_directory); copy_attachment_file($attachment_id, $old_directory, $new_directory);
Are there any such functions? If not could someone point me in the right direction and let me know which functions I have to use to accomplish that. Then I can try and code it myself, but I am a bit lost to start with.