/// <summary> /// Path Substitution /// </summary> /// <param name="filePath"></param> /// <param name="txtFilePathSubstitution"></param> /// <returns></returns> private string PathSubstituion(string filePath, FilePathSubstitutionBEO txtFilePathSubstitution) { var modifiedPath = (!String.IsNullOrEmpty(Path.GetDirectoryName(filePath))) ? Path.GetDirectoryName(filePath).Replace( txtFilePathSubstitution.StringToMatch, txtFilePathSubstitution.StringToReplace) : String.Empty; return((modifiedPath != String.Empty) ? (modifiedPath + @"\" + Path.GetFileName(filePath)) : filePath); }
/// <summary> /// Path Substitution /// </summary> /// <param name="filePath"></param> /// <param name="txtFilePathSubstitution"></param> /// <returns></returns> private string PathSubstituion(string filePath, FilePathSubstitutionBEO txtFilePathSubstitution) { string modifiedPath = (!string.IsNullOrEmpty(Path.GetDirectoryName(filePath))) ? Path.GetDirectoryName(filePath).Replace(txtFilePathSubstitution.StringToMatch, txtFilePathSubstitution.StringToReplace) : string.Empty; return (modifiedPath != string.Empty) ? (modifiedPath + Constants.BackSlash + Path.GetFileName(filePath)) : filePath; }
/// <summary> /// Path Substitution /// </summary> /// <param name="filePath"></param> /// <param name="txtFilePathSubstitution"></param> /// <returns></returns> private string PathSubstituion(string filePath, FilePathSubstitutionBEO txtFilePathSubstitution) { var modifiedPath = (!String.IsNullOrEmpty(Path.GetDirectoryName(filePath))) ? Path.GetDirectoryName(filePath).Replace( txtFilePathSubstitution.StringToMatch, txtFilePathSubstitution.StringToReplace) : String.Empty; return (modifiedPath != String.Empty) ? (modifiedPath + @"\" + Path.GetFileName(filePath)) : filePath; }