It's a hack. But, assuming that your database is on the same drive
as your AmiBroker installation, it will do the job ;)
  Mike
  function getDriveLetter() { 
   AB = CreateObject("Broker.Application"); 
   Path = AB.DatabasePath; 
   Index = StrFind(Path, ":"); 
  
   if
(Index > 0) { 
      Drive = StrLeft(Path, 1); 
   } else { 
      Drive = ""; 
   } 
  
   return Drive; 
} 
  
  _TRACE("Drive letter: " + getDriveLetter()); 
  
  Buy
= Sell
= 0;