I am trying to rename file( removing few unwanted characters adding few etc). I am able to do it via itemadded event I have tried
SPFile.MoveTo( works fine) and simple changing
property["Name"] it works as well.
My issue is that none of these ways are making versions,
MoveTo just removes existing file and creates/moves new(tried overwrite option but didn't helped) where changing property name doesn't work if filename is already in use.
I have tried itemadding event but that doesn't work for me either. Can anyone help me with this?