Blender Python erase whole Directory content After a week I made a nice Addon for Blender. For testing I run it with

import bpy
import sys

scriptdir = "S:Blender\Dev\Scripts\Addons\meshEdit"
sys.path.append(scriptdir)

# Test  
filename = "S:\Scripts\Addons\meshEdit\meshEditorv7.py"
exec(compile(open(filename).read(), filename, 'exec'))


from Blender.
All Package-Files are located in the Folder 'scriptdir'.
After I finished i copy all Files to an other Folder (named 'S:\Setup Blender\AddOnes\meshEdit)
and install it as Addon 'meshEdit' from Blenders Preferences/Addons.

Everything works fine.

For testing i remove the Addon 'meshEdit'

After this I realize that Blender has removed EVERY Python-File in the Develope-Folder

"S:Blender\Dev\Scripts\Addons\meshEdit", 

including ALL 5 backup copies Folders inside.

I thinks the reason for this the Codeline 'sys.path.append(scriptdir)'
So is there an other Way to testing an Addon and avoid this behaviour?

And is there a way to recover my work?
As well as the addons folder installed with blender you can have addons within blender's preferences folder. How to find the user config folder on each system is explained here.

Within the config folder for the current blender version, you can create a scripts/addons folder (which is where blender places scripts when you use the install from file button). Inside this addons folder, create and edit your addon. Your addon will show up in the addon list in preferences where you can enable/disable it after each change.

When you are happy with your edits, copy the addon to your backup folder. As the addon is edited in place you reduce the chance of erasing the wrong file and you can also remove/re-install blender without deleting your file.