Wednesday, June 16, 2010

Displaying the names of the files in the directory

To display names of the files in directory

static void ShowFileNameinDirectory(Args _args)
  {
      int           handle;
      FilePath      filePath;
      FileName      FileName;
      ;
      filepath = "D:\\Cole Hersee Reports";
      [handle,filename] =
       WinAPI::findFirstFile(filepath + \\*.xls);
      while (filename)
      {
          info(filepath + "\\" + filename);
          filename = WinAPI::findNextFile(handle);
      }

      WinAPI::findClose(handle);
  }

No comments:

Post a Comment