Posted on: 6/26/2015 10:09:50 PM | Views : 709

I have the path coming like this from datareader: where the file should be: sDocName = D:\\ProjImages\\TDS\\437.234.ACTAABRIL.pdf
if file doesn't exist at the above path: i would like to replace teh D:\\ with this \\\\MyRepoServer\\Fileshare\\
\\\\MyRepoServer\\Fileshare\\ProjImages\\TDS\\437.234.ACTAABRIL.pdf


string aFilePath = aDataReader["FilePath"].ToString();
sDocName = aFilePath; sDocName = D:\\ProjImages\\TDS\\437.234.ACTAABRIL.pdf string fileTypName = Path.GetFileName(sDocName); string fileDir = Path.GetDirectoryName(sDocName); string checkExt = System.IO.Path.GetExtension(fileTypName); string root = (fileDir + "\\"); string filepath = (root + fileTypName); // Dim root As String = "E:\SavedFiles\"
if (!(filepath == null)) { if ((File.Exists(filepath) && filepath.StartsWith(root)))


Tha ...

Go to the complete details ...