How copy file field data from one file field to another using Views Bulk Operations? For example, you want to copy the data for a file field with the machine readable name field_pdf into field_attachment

I been following the examples, but there is not an example for this action. 

Is this possible with VBO and if so what is the code?

I would very much like to resolve this problem for myself and update the page on d.o
Here is a pure site-building approach:


Install File Field Rules
Define a new Rule Component (an "Action set"), named e.g. "Copy file"


Define at least one input/parameter, e.g. node_source
Define optionally a second input/parameter, e.g. node_target

Configure your Rule component to perform a "Copy file field contents" action, with the following settings:


Source entity => e.g. 'node_source'
Destination entity => e.g. 'node_target': This depends on your case, you may even want to copy a file inside the same node, between different fields. You can in that case, use 'node_source' again as your target entity.
Select the Source and Destination fields
Save our component and you are done with Rules configurations.

Back to your View and VBO field configuration, you can now select the "Copy file" action.


I tried this and was able to copy an image file between two different article nodes, hope it works for you too.