Copy and Paste python

There is a simple trick to speed up the copy and paste process.

Open the python console

Copy this script into the python source editor.

iface = qgis.utils.iface
source = QgsProject.instance().mapLayersByName(‘enter the name of the layer you are copying from here)[0]
iface.setActiveLayer( source )
iface.actionCopyFeatures().trigger()
target = QgsProject.instance().mapLayersByName(‘enter the name of the layer you are copying to here‘)[0]
iface.setActiveLayer( target )
iface.actionPasteFeatures().trigger()
target.removeSelection()
iface.setActiveLayer( source )

Chnage the bold text in the above script to the appropriate file names.

Now clicking the arrow button on the python consol will autmoatically save your selected features to your destination shape file.