SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My file is in the solution (Files\customer invoice.xls) and this is how I am referencing it in the code. but in debug it shows c:\windows\system32\inetsrv\Files\customer invoice.xls'.

how should I reference it?

share|improve this question

Without seeing any additional code my first guess is that you have mixed up System.IO.File and Microsoft.SharePoint.SPFile.

Please add your code as well to the question, that would help, a lot!

share|improve this answer
How do I copy a file from a site collection list to another list in a web (under the same sc)? (oh using object model) – Robert G May 31 '11 at 21:43
Robert G - use SPFile.CopyTo() ( - but I'd recommend you ask that in a new question as the answer is very specific and different to the problem described in this question. – James Love Jun 30 '11 at 22:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.