41

I was just working on my Netbeans project and accidentally deleted it and don't know how to recover it.

Is there a tmp folder that the deleted project is stored in.

Or am I forever doomed?

Thanks, Lucas

Rich Seller
  • 83,208
  • 23
  • 172
  • 177
Lycana
  • 1,154
  • 4
  • 10
  • 17
  • Here yah go [http://stackoverflow.com/questions/1159126/i-accidentally-deleted-a-very-important-zip-file-through-netbeans][1] [1]: http://stackoverflow.com/questions/1159126/i-accidentally-deleted-a-very-important-zip-file-through-netbeans – cnizzardini Mar 22 '12 at 18:14

6 Answers6

133

Do not panic. Its very easy. Follow the steps:

  1. Right click on the folder/directory that the files had been deleted.

  2. Choose Local History – Restore Deleted

  3. Done

Swar
  • 5,473
  • 3
  • 31
  • 43
  • 2
    how is this supposed to revert a project? If i delete a project i have no node to do a right click on. – Oliver Watkins Dec 17 '13 at 10:32
  • M not getting how to right click on the deleted folder of my Net beans Project ? – Shashank Vivek Apr 02 '14 at 03:47
  • 3
    Unfortunately, this does not work if the folder has been deleted :( Recuva does but only so far back. Better than scratch though! – tricknology Sep 13 '14 at 07:16
  • 1
    Are you supposed to perform these steps in Windows Explorer or in NetBeans? – Geoff Dawdy Oct 05 '15 at 03:40
  • 2
    9 years after this post had been made, this *non relevant* answer saved my day! @GeoffDawdy Don't quit NetBeans. In NetBeans Projects pane (the tree all to the left), go to the folder where you deleted the files, right click on its icon. From the popup menu, click History -> Revert deleted. NetBeans will restore anything you erased o mistakenly GIT hard reset. – Dario Fumagalli Dec 09 '17 at 12:09
  • This will recover deleted files - very useful answer!! – meolic Mar 04 '19 at 08:36
42

If you accidentally delete a folder on Netbean, the way to recover it is as follows. You can't revert deleted folders but you can revert deleted files. Follow these steps.

  1. Recreate the folder you deleted in your Netbean project. (You may not be able to create the folder within Netbean, in that case you can use mkdir command to create the folder )
  2. Right click that folder in Netbeans and go to History -> revert deleted (you should see a list of deleted files that relate to that particular folder.
  3. Repeat for each folder and sub-folder

Note: I do not know if this works on windows, I know it worked for me on Linux. I also don't know if this works after you have closed Netbeans.

hope it helps someone.

user2840640
  • 421
  • 4
  • 2
  • it helped to recover few jsp that too broken.No java files were recovred – Shashank Vivek Apr 02 '14 at 03:54
  • Just to mention this works also on Windows 7 and Netbeans 7.4 – laaposto Feb 12 '15 at 11:53
  • what your answer did now I can recover all previously deleted projects with Recuva. The new folder overrided something in file descriptor of windows10 with empty folder . Going to use harder tools now :/ – CodeToLife Mar 03 '18 at 12:46
18

You have a problem of package/directory/file deleted in netbeans? Don't panic it is simple just:

  1. open your netbeans IDE
  2. go to projects
  3. go to the package where your project folder was
  4. right click on it
  5. go to local history, then go to revert deleted
  6. it is done. Wait a moment!

I think it will help you. Enjoy your code please.

Roman
  • 17,008
  • 3
  • 36
  • 49
user2272424
  • 181
  • 1
  • 2
2

http://www.recuva.com/

saved me countless times when I first started with Visual C# opening the IDE and making mini programs without saving. All your files are stored in a temporary folder and exiting Visual C# wipes them. Just do a recuva scan and sort files found by modification time. Deleted files are recoverable, overwritten files however are a different story, so run the program as soon as possible.

John T
  • 23,735
  • 11
  • 56
  • 82
0

Actually, easier then trying to load a project that does not exist in the project explorer of netbeans.

If you still have the files locally, just choose Open Project and your lost project will be restored to the Project explorer of netbeans.

pingle60
  • 726
  • 7
  • 9
-1

I don't know if there is a temp folder. Windows search engine doesn't work to find it. If you delete the source file by using safely delete;

On Netbeans Refactor-Undo[Safely Delete] option can be used to recover...