# "cannot open file" "Main XML file does not exist"

**URL:** <https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367>\
**Category:** Bug Reports\
**Created:** [24 December 2024 21:23 UTC](https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367 "2024-12-24T21:23:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![florenz](https://discuss.pencil2d.org/letter_avatar_proxy/v4/letter/f/ed8c4c/32.png) [@florenz](https://discuss.pencil2d.org/u/florenz)\
**Post date:** [24 December 2024 21:23 UTC](https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367/1 "2024-12-24T21:23:46Z")

</div>

i woke up and then i see “cannot open file” and i cannot figure out how to fix this issue ive been trying countless tutorials but none worked when i click the “open temporary directory” theres no main.xml and theres completely nothing in the data folder im using windows 10 heres what ive been told from the app " Main XML file does not exist System Info Pencil2D version: 0.7.0.939 (stable) Build ABI: x86\_64-little\_endian-llp64 Kernel: winnt, 10.0.19045 Operating System: Windows 10 Version 2009 end" please help ASAP

---

<div class="post-metadata">

**Author:** ![JoseMoreno](https://discuss.pencil2d.org/user_avatar/discuss.pencil2d.org/josemoreno/32/7_2.png) [@JoseMoreno](https://discuss.pencil2d.org/u/JoseMoreno)\
**Post date:** [25 December 2024 18:20 UTC](https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367/2 "2024-12-25T18:20:44Z")

</div>

@florenz Hi welcome to the forum. Sorry to hear about your issue.

This problem occurs when during any external event (e.g. blackout, power surge, HDD failure, etc) or an internal event (e.g OS permissions, OS updates, 3rd party software cleaner, virus or antivirus, etc) have interrupted Pencil2D saving procedure.

Once the XML file is erased or “not written” it can’t be restored. The only way to recover the work is to rebuild the pencil2D file with the `data` resource folder which should have, hopefully, all of your drawings and assets.

Sometimes if the issue is severe and saving was interrupted early you might lose your work partially.

If you have already tried other guides, please go back to our Project Corruption Prevention guide and check the #5 SAVE FILE VERIFICATION section.

> [@Pencil2D Project File Corruption Prevention / Partial Recovery Guide](https://discuss.pencil2d.org/t/pencil2d-project-file-corruption-prevention-partial-recovery-guide/3105/1#verification):
>
> If you’re just starting out with Pencil2D, the development team has been fixing a few bugs that have to do with saving and loading. Release version 0.6.5 and above should minimize these issues download it here: [Download | Pencil2D Animation](http://pencil2d.org/download)Table of Contents [Corruption Prevention Tips](#prevention) a. [OS Agnostic Tips](#agnostic)[Recovery Scenarios](#scenarios)[Recovery Considerations](#considerations)[Recovery Procedure](#recovery) a. [Windows](#windows) b. [MacOS](#mac)[Save File Verification](#verification)[OS File Backup & Recovery Settings](#backup)[Experimental Recovery Methods](#experimental) CORRUPTION PREV…

There you’ll see a guide on how to UNZIP your PCLX file and take the data folder out from the corrupted save file.

If you can’t open the file, them I’m afraid it’s not possible to recover the work 😔

However **If you can open the PCLX file** by using a ZIP file manager, save the data folder elsewhere, then you can do the following:

1. Open Pencil2D
2. Go to File \> Import \> Image Predefined Set
3. On the modal window press the **[Browse…]** button
4. A file explorer from your operating system will appear. Look for the `data` folder you recovered.
5. Depending on how many layers and frames you have, the `data` folder will show you a sequence of images with the following naming conventions:
  - Example file name: `001.001.png`
  - The name means it is the first frame that was place on the first layer on the original file.

6. If you select this single file and press **[Open]** button, any other file that is related to it by name will be loaded into the window as a file list preview and then will be place on the specific frame that the name indicates e.g `001.006.png` will go into a new Layer 1, Frame 6, `001.040.png` will go to the same Layer 1, Frame 40, and so on.
7. Then you can keep repeating the process for as many layers as you have.
8. ⚠ It’s important to note that the XML file that was deleted stored all the visual display properties for each image, so if your drawing was not made with a specific size in mind, they will probably become shifted and you will have to move them one by one.   
   
For this in V7.0 there’s also a new tool that allows you to move many frames in a single layer at a time. To use it do the following:
  - Select 2 or more frames on layer that have drawings you want to reposition.
  - (Optional) Create a selection around the approximate area where the drawings appear visually, if you’re unsure turn on the “onion skins” feature and check how large the selection box should be. _Note: If you don’t create a selection the feature will create one for you._
  - Go to Animation Menu \> Reposition Selected Frames
  - A floating window will appear.  
 ![image](https://discuss.pencil2d.org/uploads/default/original/2X/b/b77f19f5777696e0579ec0b6fac1b82f504fe82c.png)
  - Depending on how many layers you have these will be numbered 1 through X as many bitmap layers you have. Top Bitmap layer on the timeline = Layer index #1 in this window. Any other layer that show below that will be the next logical number. Select the Layer where the drawings are.
  - Now move the selection with drawing to the new position. Make sure the "Repositiond: (0,0) coordiantes in the window have updated.
  - If everything is good, then click the **[Reposition]** button to finalize the operation.

Hopefully with this you can rebuild your file as close as it was before.

Lastly, a word of advice, make sure you always save extra backup copies to fall back in case of file corruption and check them before closing the Pencil2D app. Good luck!

---

<div class="post-metadata">

**Author:** ![Starter](https://discuss.pencil2d.org/user_avatar/discuss.pencil2d.org/starter/32/2567_2.png) [@Starter](https://discuss.pencil2d.org/u/Starter)\
**Post date:** [26 December 2024 12:38 UTC](https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367/3 "2024-12-26T12:38:25Z")

</div>

Pardon me for butting into the conversion.

But I’d like to make the point that saving the project as a single copy of a file isn’t a good policy.

I may start a project and call the first save MyProject-1.pclx. After more effort, when I save my work I’ll save it as MyProject-2.pclx.

After several sessions, working on the project I’ll have a series of files, with different numbers at the end of the filename.

If any file errors occur, when saving, I’ll have access to the previous saved version of the project, to act as the basis of project recovery.

I use this method for all my computer based projects including Pencil2D, Gimp and my MS Word files. This was suggested by my course tutor, when I started my course.

---

<div class="post-metadata">

**Author:** ![system](https://discuss.pencil2d.org/uploads/default/original/2X/b/be472d9d9c3e92d2432da03a00b781a7f15bc51b.png) [@system](https://discuss.pencil2d.org/u/system)\
**Post date:** [6 February 2025 12:38 UTC](https://discuss.pencil2d.org/t/cannot-open-file-main-xml-file-does-not-exist/9367/4 "2025-02-06T12:38:53Z")

</div>

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.
