you can't INSERT something into a file.
What you have to do in this case is to:
1) write the new content into a new file
2) read the whole old content and append it to the new file
3) remove the old file
4) rename the new to the old file
My point is becase I am searching a way how to encrypt the full Project but I have to insert the key in every file.
Can you please describe which part of the project you want to encrypt.
Encrypting the full project is not possible by adding information to files, e.g. the database files cannot be modified by adding some text.
Best Regards
Leopold Knipp
Senior Support Specialist
It seems very easy task but I am getting some trouble.
I want to encrypt our library that has a deep structure:
I have to loop through all the script in all folder and subfolder, but I am not finding a way to do it recursively and add the string // $License: NOLICENSE.
it seems a stupid function but I not able to loop tought the structure in a easy way.
Have a look at the functions getFileNames() and isfile() in WinCC Help.
If you use getFileNames() recursively on all directories found you should easily be able to work you way through your whole file structure.