Is there a built in .NET function to get a unique filename if a filename already exists? So if I try and save MyDoc.doc
and it already exists, the file will save with name MyDoc(1).doc
, the same way a browser download works for example.
If not, what is the most efficient way to achieve this result?
I am using the File.Move
function at the moment btw.