6

Is there any way available to restore my unsaved python script in qgis? Yesterday I forget to save my scripts and now I open QGIS project I lost my all three scripts.

I used notepad++ or different IDEs that automatically save all your scripts but I guess this feature is not available in QGIS.

asked Sep 5, 2016 at 4:57

1 Answer 1

4

It may be possible to restore unsaved scripts (provided the temporary files are not deleted) as mentioned by Nyall Dawson in the ChangeLog for QGIS 2.14.2:

[console] Allow running unsaved script files

Previously a (non-default) option existed for auto-saving scripts on run, which would overwrite the existing script file if set, or save the script to a temporary file before running.

Now, the auto-save option only applies to scripts which have already been saved an have a filename. By default the console now can run scripts without filenames, or scripts with changes by transparently saving them out to a temporary file.

I haven't tested this but my guess is the scripts are saved in your TEMP folder and depending on your system configuration, could still be there.

On Windows 10 you can open an Explorer Window and type in %temp%. Then search for the latest .py files.

MrXsquared
36.2k22 gold badges76 silver badges127 bronze badges
answered Sep 5, 2016 at 9:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.