I have this string which comes from the datareader: [http://win-167nve0l50/dev/dev/new/1st Account](http://win-167nve0l50/dev/dev/new/1st%20Account)

I want the get the file name, which is "1st Account"
and the list name, which is "new" and the list address which is "<http://win-167nve0l50/dev/dev/>". This is the code I am using:
How do I retrieve the site address and the list name.

```
//getting the file URL from the data reader
string fileURL = dataReader["File URL"].ToString();

//getting the list address/path 
string listAdd = fileURL.Substring(fileURL.IndexOf("/") + 1);

//getting the file name
 string fileName = fileURL.Substring(fileURL.LastIndexOf("/") + 1);

```