title: How to get Notepad file saved location
body: <p>How to retrieve the actual path  of the notepad file if it is saved in drive. For example a notepad process is running and it is saved somewhere in the drive. How can I retrieve its full path? Using below code I can get the process detail, but not the actual path of particular files.</p>
  
  <pre><code>Process[] localByName = Process.GetProcessesByName("notepad");
  foreach (Process p in localByName)
      {
        string path  =  p.MainModule.FileName.ToString();
      }
  </code></pre>
  
  <p>this returns executeable path but i need Drive location whre the actual file reside.</p>