public static string GetPathFromFullPath(string fullPath) { return !fullPath.Contains("\\") ? Directory.GetCurrentDirectory() : fullPath.Substring(0, fullPath.LastIndexOf("\\") + 1); }