As simple as it sounds, it ain’t simple.

you would of thought the following would work:

does not compute..

There are 2 ways I’ve found of accomplishing this:

1. using the SPFile.MoveTo method:

2. using File.Item[“Name”] method..

However i have found method 1 more reliable. hope this helps!