Migrate a filefield to another filefield? I'm using Drupal 7. I have a field called field_a which is a file-field and want to create another file-field called field_b. What I want to do is to migrate all the files from field_a to field_b, then I also want to erase the records from field_a without erasing field_a. Note that field_a and field_b are in the same content type.

Is it possible? Is there a way to do this with VBO?
The best way to do this without writing a module or messing with your database is to use views bulk operations with rules.

Here is an example of moving a file from one file field to another.  You'll have to change the field names before you import this rule.

Basically add a rules component- then add your conditions and action

Variables

Datatype Node

Usage Parameter

Conditions

Entity has field - field_a

Entity has field - field_b

Actions

Create a loop to loop over multiple values in field_a.

Inside loop add item to list

Inside same loop remove item from list

Outside of loop Save your node.

{ "rules_fa_fb" : {
    "LABEL" : "Move resource files from one field to another.",
    "PLUGIN" : "rule",
    "OWNER" : "rules",
    "TAGS" : [ "Dev" ],
    "REQUIRES" : [ "rules" ],
    "USES VARIABLES" : { "nodes" : { "label" : "nodes", "type" : "node" } },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "nodes" ], "field" : "field_field_a" } },
      { "entity_has_field" : { "entity" : [ "nodes" ], "field" : "field_field_b" } }
    ],
    "DO" : [
      { "LOOP" : {
          "USING" : { "list" : [ "nodes:field-field-b" ] },
          "ITEM" : { "file" : "files" },
          "DO" : [
            { "list_add" : {
                "list" : [ "nodes:field-field-a" ],
                "item" : [ "file" ],
                "unique" : 1
              }
            },
            { "entity_save" : { "data" : [ "resource" ], "immediate" : "1" } },
            { "list_remove" : { "list" : [ "nodes:field-field-a" ], "item" : [ "file" ] } }
          ]
        }
      },
      { "entity_save" : { "data" : [ "nodes" ], "immediate" : 1 } }
    ]
  }
}


Then create the view with a bulk operations field, you'll need to change some values to import into your system.  

$view = new view();
$view-&gt;name = 'move_files_from_on_field_to_another';
$view-&gt;description = '';
$view-&gt;tag = 'default';
$view-&gt;base_table = 'node';
$view-&gt;human_name = 'Move files from on field to another';
$view-&gt;core = 7;
$view-&gt;api_version = '3.0';
$view-&gt;disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view-&gt;new_display('default', 'Master', 'default');
$handler-&gt;display-&gt;display_options['title'] = 'Move files from on field to another';
$handler-&gt;display-&gt;display_options['use_more_always'] = FALSE;
$handler-&gt;display-&gt;display_options['access']['type'] = 'perm';
$handler-&gt;display-&gt;display_options['cache']['type'] = 'none';
$handler-&gt;display-&gt;display_options['query']['type'] = 'views_query';
$handler-&gt;display-&gt;display_options['exposed_form']['type'] = 'basic';
$handler-&gt;display-&gt;display_options['pager']['type'] = 'full';
$handler-&gt;display-&gt;display_options['pager']['options']['items_per_page'] = '10';
$handler-&gt;display-&gt;display_options['style_plugin'] = 'table';
$handler-&gt;display-&gt;display_options['style_options']['columns'] = array(
  'title' =&gt; 'title',
);
$handler-&gt;display-&gt;display_options['style_options']['default'] = '-1';
$handler-&gt;display-&gt;display_options['style_options']['info'] = array(
  'title' =&gt; array(
    'sortable' =&gt; 0,
    'default_sort_order' =&gt; 'asc',
    'align' =&gt; '',
    'separator' =&gt; '',
    'empty_column' =&gt; 0,
  ),
);
/* Field: Bulk operations: Content */
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['table'] = 'node';
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0';
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler-&gt;display-&gt;display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
  'action::node_assign_owner_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::views_bulk_operations_delete_item' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::views_bulk_operations_delete_revision' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::views_bulk_operations_script_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::flag_node_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_make_sticky_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_make_unsticky_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::views_bulk_operations_modify_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
    'settings' =&gt; array(
      'show_all_tokens' =&gt; 1,
      'display_values' =&gt; array(
        '_all_' =&gt; '_all_',
      ),
    ),
  ),
  'rules_component::rules_fa_fb' =&gt; array(
    'selected' =&gt; 1,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 1,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::views_bulk_operations_argument_selector_action' =&gt; array(
    'selected' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
    'settings' =&gt; array(
      'url' =&gt; '',
    ),
  ),
  'action::node_promote_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_publish_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_unpromote_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_save_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::system_send_email_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::redhen_fields_email_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_unpublish_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::node_unpublish_by_keyword_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::auto_entitylabel_entity_update_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
  'action::pathauto_node_update_action' =&gt; array(
    'selected' =&gt; 0,
    'postpone_processing' =&gt; 0,
    'skip_confirmation' =&gt; 0,
    'override_label' =&gt; 0,
    'label' =&gt; '',
  ),
);
/* Field: Content: Title */
$handler-&gt;display-&gt;display_options['fields']['title']['id'] = 'title';
$handler-&gt;display-&gt;display_options['fields']['title']['table'] = 'node';
$handler-&gt;display-&gt;display_options['fields']['title']['field'] = 'title';
$handler-&gt;display-&gt;display_options['fields']['title']['label'] = '';
$handler-&gt;display-&gt;display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler-&gt;display-&gt;display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Field: Content: Files - for digital */
$handler-&gt;display-&gt;display_options['fields']['field_resource_file']['id'] = 'field_resource_file';
$handler-&gt;display-&gt;display_options['fields']['field_resource_file']['table'] = 'field_data_field_resource_file';
$handler-&gt;display-&gt;display_options['fields']['field_resource_file']['field'] = 'field_resource_file';
$handler-&gt;display-&gt;display_options['fields']['field_resource_file']['click_sort_column'] = 'fid';
$handler-&gt;display-&gt;display_options['fields']['field_resource_file']['delta_offset'] = '0';
/* Field: Content: Files - for print */
$handler-&gt;display-&gt;display_options['fields']['field_files_for_print']['id'] = 'field_files_for_print';
$handler-&gt;display-&gt;display_options['fields']['field_files_for_print']['table'] = 'field_data_field_files_for_print';
$handler-&gt;display-&gt;display_options['fields']['field_files_for_print']['field'] = 'field_files_for_print';
$handler-&gt;display-&gt;display_options['fields']['field_files_for_print']['click_sort_column'] = 'fid';
$handler-&gt;display-&gt;display_options['fields']['field_files_for_print']['delta_offset'] = '0';
/* Sort criterion: Content: Post date */
$handler-&gt;display-&gt;display_options['sorts']['created']['id'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['table'] = 'node';
$handler-&gt;display-&gt;display_options['sorts']['created']['field'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: Content: Published */
$handler-&gt;display-&gt;display_options['filters']['status']['id'] = 'status';
$handler-&gt;display-&gt;display_options['filters']['status']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['status']['field'] = 'status';
$handler-&gt;display-&gt;display_options['filters']['status']['value'] = 1;
$handler-&gt;display-&gt;display_options['filters']['status']['group'] = 1;
$handler-&gt;display-&gt;display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler-&gt;display-&gt;display_options['filters']['type']['id'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['type']['field'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['value'] = array(
  'resource' =&gt; 'resource',
);

/* Display: Page */
$handler = $view-&gt;new_display('page', 'Page', 'page');
$handler-&gt;display-&gt;display_options['path'] = 'admin/move-files-from-on-field-to-another';