Author Topic: permently deleting a second copy of application  (Read 320 times)


  • New Member
  • *
  • Posts: 45
permently deleting a second copy of application
« on: January 18, 2023, 05:57:44 am »
Hello, and please help.
I have been developing an application for several years, first in Delphi and now in Lazarus.  It is very large with many forms.  Recently, I wanted to start a new version and created a directory whose name reflected the current date.  I copied the program's main form to that directory with the goal of continuing development of new additional forms there.  I should have known that I was asking for disaster, because that is what has befallen me. Now, each time I try to compile the program under the former version, I get an "Exit 1" message.  I have tried to find out how to cure this and that has been to no avail.  So I tried to delete that new location, but the OS ? will not allow it.  How can I delete this entire folder? Is the "shred" option the one I want to use or is there another way that does not sound so dangerous?  Also is there anything else I can do to revert to my original program"?
Thank you in advance.


  • Hero Member
  • *****
  • Posts: 12933
Re: permently deleting a second copy of application
« Reply #1 on: January 18, 2023, 06:06:06 am »
John, you did not use a version control system? Then it would be easy, but now I can't provide a viable answer without knowing exactly how you set up your development environment.
It seems that in your case the only option is to remove everything by hand after making a back-up.
Complex projects should be in a version control system like svn or git.
« Last Edit: January 18, 2023, 09:03:24 am by Thaddy »
In memory of Gordon Moore  (January 3, 1929 – March 24, 2023) Just double the heaven every two years from now.


  • Hero Member
  • *****
  • Posts: 2364
    • tomboy-ng, a rewrite of the classic Tomboy
Re: permently deleting a second copy of application
« Reply #2 on: January 18, 2023, 06:08:02 am »
Well, first of all, I would not go deleting anything until you are back to a working system. Renaming might be a good idea.

Next, deleting a directory, moving directories around, renaming directories is a operating system function, you have not mentioned just what your OS is. My guess Windows but you need to confirm.  Maybe outline the directory structure, but no deleting yet !

What you sound like you are doing is quite reasonable but maybe you have missed a few steps or what ever ?

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -


  • Hero Member
  • *****
  • Posts: 953
Re: permently deleting a second copy of application
« Reply #3 on: January 18, 2023, 07:18:27 am »
You'll have to give more information.
You said you've copied program's main form in new directory. Only main form or complete project?
Also, you can't compile former version. Can you compile new version? How do you switch between this versions?

Also, write Lazarus and OS version.


  • Hero Member
  • *****
  • Posts: 1047
Re: permently deleting a second copy of application
« Reply #4 on: January 18, 2023, 12:07:34 pm »

Assuming windows.

Make sure your Antivirus is not scanning the new or old  folder, it will probably effect copying of files and the compiling... so exclude the new and old folder. before you copy anything to it.

in the new folder you should have a folder named lib
delete the folder or if you cant; delete the folders with in it, these contain the pre-compiled code for linking.

check that you project is not accessing files from your old folder, go through the Project->Option and check everything.
also check your code for any include files are not using absolute file paths , ie not c:\my_project\super_app\includes\; should use relative file path ie includes\ 

when this is all done, open the new project and RE-bUILD (Run->Clean Up & Build) tick the box for delete and then choose clean up and build , this will re-create the lib folder..

when rebuilding is happening, check the message window to check that its compiling all code from the new folder.

Just some ideas.
« Last Edit: January 18, 2023, 01:18:26 pm by Josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.


TinyPortal © 2005-2018