string fileAndPath = @"c:\webserver\public\myCompany\configs\promo.xml"; string currentDirectory = Path.GetDirectoryName(fileAndPath); string fullPathOnly = Path.GetFullPath(currentDirectory); currentDirectory: c:\webserver\public\myCompany\configs
fullPathOnly: c:\webserver\public\myCompany\configs