Whenever I create a new layer out of selected features on QGIS, several files are created and saved on my machine. These files have the following extensions: .cpg, .dbf, .prj, .qmd, .shp and .shx.

Is there a name for these files? How can they be used in a different project (if I, at some point, want to include the same layer) and what is the best way to manage them, since it easily becomes a large amount?

I create the new layer by right clicking on the layer with the selected features > Export > Save Selected Features As.

  • The "main" Shapefile file is the one with file extension .shp (normally it is the one with the largest file size). The other files can be (inofficially?) named "sidecar" files. At least some of them are necessary for the Shapefile to work properly. See also here: gis.stackexchange.com/a/414868/88814
    – Babel
    May 21, 2023 at 9:37

2 Answers 2


These are all parts of a Shapefile.

The best way to manage them is to not create them in the first place!

Consider saving your files as GeoPackage (GPKG) instead. It's a more modern format - Shapefiles have many limitations - and the GeoPackage will be in one file instead of several.

See https://www.geopackage.org/

You can select GeoPackage from the drop-down in the Save Selected Features As... interface.

enter image description here

  • Thank you. How do I save the selected features as GeoPackage instead of these multiple files?
    – user224727
    May 20, 2023 at 13:10
  • 3
    Maybe update your question with the steps are you currently to create the layer, and I can update the answer. There are various methods for creating layers from selected features, so best to be specific. May 20, 2023 at 13:15
  • 2
    I agree with the GPKG solution. Nevertheless, it might help you understand shapefiles because they are still very common in the GIS world. Here are two good places to learn about them: desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/… and desktop.arcgis.com/en/arcmap/latest/manage-data/shapefiles/… Wikipedia also!
    – Stu Smith
    May 20, 2023 at 16:47
  • ... in to complete what @StuSmith linked, here background information about the (mainly) disadvantages of Shapefiles and what advantages you have using Geopackage instead: switchfromshapefile.org (at the bottom also some other formats, for each the scenarios are listed when its use makes sense).
    – Babel
    May 21, 2023 at 9:29

Although I agree that Geopackage is a better solution, you can always zip all resulting files from a query (they all will have the same name with different extensions) into a zip file. These zip files can be dragged and dropped into the layers window of any QGIS project. Be aware, however, that when using zipped files, layer editions can't be saved unless you save them as another file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.