Corrupted Project after unexpected shutdown

I have a terrible situation where a Project I was working, got corrupted after my PC unexpectedly shut down (yes, black screen - no power, without any warning…) while working on the project (maybe even saving at the time of the incident)…

Is there a way to restore the project?

What version of AppStudio are you using?

I am using the latest version 7.4.0.3

Starting with AppStudio 7, your project is stored in a folder of files. (before, it was all one large file).

This can make it easier to recover after a catastrophic failure. You can open the folder and see the files which make up the project.

It might be best to start with a backup, then copy parts from the corrupted folder.

When you say “Start with a backup”, what exactly do you mean? Start on a new Project, then transferring files from the corrupted one?

Do you keep any kind of backup of your work?

This could be an automated backup of your system using a utility, a cloud service like DropBox or Github?

https://blog.appstudio.dev/2018/10/as7-introducing-github/

No, I didn’t keep any backup.

ok, I have managed to restore Forms and relevant controls by transferring files and folders from the corrupted folder to a new project’s folder but the code behind the form is missing. Where would I find the code behind a form’s elements?

The code is in the Forms folders, ending in either .bas or .js.

For whatever it is worth:

This is not a statement about AppStudio but about development in general:

It’s a very good idea to come up with your own convenient way of frequently taking a copy of your project folder and saving. Regardless of the development tool I am using, I do this all the time. Literally at least every hour while developing. I copy the whole folder, and I give it a unique name by using the date and time in the folder name. Then, whenever I need to walk Backwards, I can just flip back to a previous folder.

There are many ways to achieve it, but however you do it, it is a good idea to get in that habit.

Totally agree.
I’ll start doing it from now on.

For anyone having the same issue as me, please note the following:
I came up on a situation where the .js (code files) where gone after an unexpected shut down, without having a backup of my project.
Fortunately for me, I had deployed the app to a local folder (Deploy in Local Folder option).
So, what I did to restore the missing code was to go to the folder where I had deployed the app and grab it from the code.js file residing inside the folder root path.

Hope the above will help someone.