Is there a way other than looping through the Files in a SPFolder to determine if a give filename (string) exists?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can, if you know the URL also use the SPFile.Exists property as follows:
One would on first thought assume SPWeb.GetFile throws an exception if the file does not exist. But as you see this is not the case – it will actually return a SPFile object.