Author Topic: Had to delete C::B along with the projects folder  (Read 5392 times)

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Had to delete C::B along with the projects folder
« on: April 12, 2012, 03:37:18 pm »
Ok so yesterday i discover Alman and Sality in my PC so i had to clean it up alot, many programs were infected including my C::B projects. I couldnt delete or reinstall it from Control Panel so i had to delete the C::B folder and clean the whole register with CCleaner along with the projects couse they were transformed in a 1b files.
I want to download a new C::B and that isnt a problem, the real problem is, can i get my projects back, is there a function that will get them back. I dont want to download a new IDE before i hear any helping comments. I did not save the projects folder in any data-holder website.

Thanks, Yuliqn.

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Had to delete C::B along with the projects folder
« Reply #1 on: April 12, 2012, 03:54:07 pm »
If your project files are transformed in 1b files, I seriously doubt that you can recover them.
For all files which were not affected, there will be no problems.
And anyway, source code is not in cbp or workspace files, so it should not be long to recreate projects, if you remember which lib they are using.

NB: if you did not made big modifications on the partition, you might be able to recover some files, if you are ready to spend some hours into learning how to use recovery tools.

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Had to delete C::B along with the projects folder
« Reply #2 on: April 12, 2012, 04:07:03 pm »
For all files which were not affected, there will be no problems.
And anyway, source code is not in cbp or workspace files, so it should not be long to recreate projects, if you remember which lib they are using.

Can you be more specific on this one, please.

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Had to delete C::B along with the projects folder
« Reply #3 on: April 12, 2012, 04:24:56 pm »
If your ".cbp" (CodeBlocks Project)file has been affected by the virus, it will be hard to reuse it, if it have modified the structure. Cbp files uses XML so the structure might have been destroyed.
But if it was not, there is no problem, I never had problems when using a newer version of C::B on old .cbp files, and I am using it some years before version 10.08 (the stable begun to be pretty old ^^ ).

For the source code problem, it is easy to be more detailed: source code is in *.cpp/*.c/*.h/*.hpp files, not in *.cbp or *.depend or *.layout.
So, if your source files are not modified you will be able to create new project with the C::B assistant, and configure the new project to use old source files (just "add existing files"). For libraries, you have been able to configure them once, you should be able to do that twice.

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Had to delete C::B along with the projects folder
« Reply #4 on: April 12, 2012, 04:32:56 pm »
Thanks for clearing things up!
I also did not use the cbp folder, i created my own Porjects folder where i saved every new project (yes, im still a noob).
If the files still cant be recovred, how and from where i can do it?

Really glad im getting such support!

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Had to delete C::B along with the projects folder
« Reply #5 on: April 12, 2012, 05:03:00 pm »
I do not understand what do you mean about the cbp folder...

Did you mean that you separate source code and cbp files? If yes, it is not to be a "newbie". In many projects, build systems are separated from source files. (I think I will try to modify the project wizard to give such kind of separation between source and build system, one day)

To know you you can recover your files, just try to open them with any text editor. Not something like word or wordpad, open-office or other text processor, but something like notepad, notepad++, edit (on command line).
If you can read your file, it is good, you still can use them. If they were modified and can not compile, you will at least be able to reuse part of them.
Cbp files are a bit different, they are plain text too, but they might be damaged because it is a special format, near HTML (they have the same ancestor in fact). So, being readable does not mean that they are not damaged. The only way to know is to open them with C::B (or knowing the internals of this file).

If you can not read your files with text editors, they are damaged and you will need more complex tools to recover them, depending on the file system used on the partition where they are stored.

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Had to delete C::B along with the projects folder
« Reply #6 on: April 12, 2012, 06:17:46 pm »
I see now, it gets cleared. The fact is that i deleted the whole C::B in order to clean my PC from the viruses. Inside the IDE was my projects.
I have to download a brand new IDE (i think).

I'll give an example what is poping in my head, as an idea to recover them. When i delete my Skype, the chronologie was still there, when i download the new skype. I guess its account based function.

This topic is with extremly newbie-like questions as do my projects. If there is a way to recover the code's with a brand new IDE, this will be awesome. But if not, it wont be a big deal, most of the projects was 300~ lines.

Offline renega_666

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: Had to delete C::B along with the projects folder
« Reply #7 on: April 12, 2012, 06:40:04 pm »
Skype data are program or account data. You don't create them manually nor own them, they are hidden from the lambda user and are stored somewhere (usually not where the software is installed), that's why you get them back when re-installing the software.

Source files are files that you create and that you own. Codeblocks (and any other IDE btw) knows nothing about your source files until you load them. If you delete them and you have no backups, then they are lost.

As a general advice, you should put your source files into dedicated folders and use a versioning system such as subversion or git to back up and track file changes.

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Had to delete C::B along with the projects folder
« Reply #8 on: April 12, 2012, 07:04:09 pm »
I guess they wont be recovered.
Anyway the projects are very newbie, just understanding of C++ basics and few more.

Really thanks for this fast and kind support!

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Had to delete C::B along with the projects folder
« Reply #9 on: April 13, 2012, 05:14:06 pm »
There are tools like undelete, which can allow to retrieve deleted files.
But they can only give good results if there were not many modifications on the file system. You could try some research on that subject. (In fact, even formatting can be undone).
Depending on many factors, results are not guaranteed.

And I agree with renega_666, you should really spend some time into versioning control systems. They will save you lot of time, because they are able to remember modifications you made on your source files.

Offline perento

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Had to delete C::B along with the projects folder
« Reply #10 on: April 13, 2012, 06:43:47 pm »
There are tools like undelete, which can allow to retrieve deleted files.
But they can only give good results if there were not many modifications on the file system. You could try some research on that subject. (In fact, even formatting can be undone).
Depending on many factors, results are not guaranteed.

And I agree with renega_666, you should really spend some time into versioning control systems. They will save you lot of time, because they are able to remember modifications you made on your source files.

I cannot even open them couse i deleted the whole C::B program. Maybe i can start using such tools, but first i have to learn them, actualy probably will when starting a serious project.
Thanks for the tips!