Moving media between blogs changes the URL subdirectory

On wordpress.com, I'm exporting media from one blog and import it into another.

Problem: On the source blog, some media files are e.g. in Folder "2014/02", but they get imported into folder "2014/03". As a consequence, all links in posts to this particular file are lost and need to be re-edited.

The cause seems to be that some media files have been uploaded in "February 2014", but they were published in "March 2014"

In the export XML file, you can clearly see that the original file was located in 2014/02/1.png. But since the publication date was in March 2014, it is getting imported into 2014/03/1.png, which is another directory.

Is there a way to import media files with the original URL location ?

Here is an example export of one of such media files:

item
        title1/title
        linkhttps://xxx.wordpress.com/1-84//link
        pubDateFri, 07 Mar 2014 12:21:21 +0000/pubDate
        dc:creatorxxx/dc:creator
        guid isPermaLink="false"http://xxx.files.wordpress.com/2014/02/1.png/guid
        description/description
        content:encoded![CDATA[]]/content:encoded
        excerpt:encoded![CDATA[]]/excerpt:encoded
        wp:post_id111/wp:post_id
        wp:post_date2014-03-07 12:21:21/wp:post_date
        wp:post_date_gmt2014-03-07 12:21:21/wp:post_date_gmt
        wp:comment_statusclosed/wp:comment_status
        wp:ping_statusopen/wp:ping_status
        wp:post_name1-84/wp:post_name
        wp:statusinherit/wp:status
        wp:post_parent0/wp:post_parent
        wp:menu_order0/wp:menu_order
        wp:post_typeattachment/wp:post_type
        wp:post_password/wp:post_password
        wp:is_sticky0/wp:is_sticky
        wp:attachment_urlhttps://xxx.files.wordpress.com/2014/02/1.png/wp:attachment_url
        wp:postmeta
            wp:meta_key_wp_attached_file/wp:meta_key
            wp:meta_value![CDATA[/home/wpcom/public_html/wp-content/blogs.dir/xxx/xxx/files/2014/02/1.png]]/wp:meta_value
        /wp:postmeta
        wp:postmeta
            wp:meta_key_wp_attachment_metadata/wp:meta_key
            wp:meta_value![CDATA[a:5:{s:5:"width";i:631;s:6:"height";i:631;s:4:"file";s:77:"/home/wpcom/public_html/wp-content/blogs.dir/xxx/xxx/files/2014/02/1.png";s:5:"sizes";a:0:{}s:10:"image_meta";a:10:{s:8:"aperture";i:0;s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";i:0;s:9:"copyright";s:0:"";s:12:"focal_length";i:0;s:3:"iso";i:0;s:13:"shutter_speed";i:0;s:5:"title";s:0:"";}}]]/wp:meta_value
        /wp:postmeta
    /item

Topic wordpress.com-hosting media import export bulk-import Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.