Deleting un-needed files

I have a scenario where I want to clean up during update and delete old files.

I'm guessing I need to run a custom script that will get copied to the Temp files. Any advice on at which stage to do it? Before update? I also shouldn't touch any files that are being updated, since wyUpdate uses patching system, correct?

Also, since I'm adding files to the wyBuild, is it possible to tell it to delete any files that are not in the build in specific folder?

Thanks!

I'm guessing I need to run a custom script that will get copied to the Temp files. Any advice on at which stage to do it? Before update? I also shouldn't touch any files that are being updated, since wyUpdate uses patching system, correct?

wyBuild already handles this for you -- it compares your versions to see which files to patch, which files to add as whole files, and which files to delete. This is why in the step-by-step walkthrough we say to add all files to wyBuild.

Now, if you're adding files outside of the predefined folders in wyBuild then you will need to execute a simple script to remove these files. You should include the script in the temp folder in wyBuild and have it execute after the update has completed.

So, let me make sure I understand things correctly.

If in version 1 I had a file "bin\a.dll", but I don't have it anymore in version 2 wyUpdate will delete it automatically during update.

However, if there're files that aren't either in version 1 or version 2, they won't be touched, is this correct?

Thanks.

However, if there're files that aren't either in version 1 or version 2, they won't be touched, is this correct?

Correct -- if wyUpdate doesn't know about it, it doesn't touch it.