It can be done, using a script, but it is very limited. The reason is that a script can't actually read the contents of a bookmark's action. It can only execute it, and (try to) deduce from that what it should be.
Antoher real limitation is that a script can't create any bookmark action except for "Execute a JavaScript".
So the solution is either to replace the pages of the file with those of the target file (which maintains the bookmarks structure), or use an advanced plugin/stand-alone app to do it.