```
string exeFile = (new System.Uri(Assembly.GetEntryAssembly().CodeBase)).AbsolutePath;
string exeDir = Path.GetDirectoryName(exeFile);
string fileName = Path.Combine(exeDir, @"..\..\xml\SalesOrderXMLData.csv.xml");

```

Hello,  

The above code works if the project is in, for example, 

> 
> C:\Code\ 
> 
> 
> 

but not if its in 

> 
> C:\Documents and Settings\Naim\My Documents.. 
> 
> 
> 

If i have the string, i would use escape characters where needed, but in this case, i dont know how to get around this. 

**Update:** result fileName = "D:\Naim\My%20Documents\Visual%20Studio%202008\Projects\XML\_Gen\XML\_Gen\bin\Debug\..\..\xml\SalesOrderXMLData.csv.xml"
Any help appreciated.  

Thanks