
Dealing with project files
QGIS project files are human-readable XML files with the filename ending with .qgs
. You can open them in any text editor (such as Notepad++ on Windows or gedit on Ubuntu) and read or even change the file contents.
When you save a project file, you will notice that QGIS creates a second file with the same name and a .qgs~
ending, as shown in the next screenshot. This is a simple backup copy of the project file with identical content. If your project file gets corrupted for any reason, you can simply copy the backup file, remove the ~
from the file ending, and continue working from there.

By default, QGIS stores the relative path to the datasets in the project file. If you move a project file (without its associated data files) to a different location, QGIS won't be able to locate the data files anymore and will therefore display the following Handle bad layers dialog:

Note
If you are working with data files that are stored on a network drive rather than locally on your machine, it can be useful to change from storing relative paths to storing absolute paths instead. You can change this setting by going to Project | Project Properties | General.
To fix the layers, you need to correct the path in the Datasource column. This can be done by double-clicking on the path text and typing in the correct path, or by pressing the Browse button at the bottom of the dialog and selecting the new file location in the file dialog that opens up.
Tip
A comfortable way to copy QGIS projects to other computers or share QGIS projects and associated files with other users is provided by the QConsolidate plugin. This plugin collects all the datasets used in the project and saves them in one directory, which you can then move around easily without breaking any paths.