views:

155

answers:

1

Hi

i have did like

   foreach(LogFile lf in db.Databases)
      Console.WriteLine(lf.FileName)

which displays the logfile path including extension.....My Problem is how to find the

Datafiles exact path including extension..Give me the Guidance

Any Help is Greatly Appreciated...

Thanks in Advance.

+1  A: 
    foreach (FileGroup fg in database.FileGroups)
    {
        foreach (DataFile df in fg.Files)
        {
            Console.WriteLine(Path.Combine(database.PrimaryFilePath, df.Name);
        }
    }
Mitch Wheat