1

I have just opened a project (and three periodic backups, using both QGIS 2.18 and then 3.4) and am getting a Handle Bad Layers dialogue for several hundred layers.

To my knowledge, these files have not been moved, and no one else has access to the file.

Each file location, instead of beginning C:\Users... appears in the bad layers dialogue as //localhost/C$/@GMT-2019.05.05-10.44.25/Users...

I can manually alter them, but hoped there might be a way of changing all of them simultaneously?

The answer provided to the question 'Updating file locations in QGIS projects?' suggests using the Handle Bad Layers dialogue box to rectify this by selecting all paths and then last selected, but the screenshot shows that dialogue box with 'New data' and 'New file' columns which mine does not have (see screenshot of what I get) and when I select all then edit one it only edits that single path.

![screenshot of dialogue box]https://imgur.com/NT7JNGC!

0
2

You can open your .qgs file in Notepad++ or another texteditor and then use search and replace function. If it is a .qgz file, you can first unzip it and then edit it with a texteditor.

Search for the corrupted string and replace it with a new one. Be sure this string is unique like "C:\Users\Username" and replace it with "C:\Users\Username2". What I'm trying to say is, dont just search for "Users" as you might accidentially replace something else .

When you are done save the file and open it with QGIS.

PS: To be save, create a backup of your .qgs file before doing it.

1
  • Thnks. I'd still love a way to deal with it within QGIS, but this worked! May 22 '19 at 7:55

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