Quote Originally Posted by fortyhideout12 View Post
Could I just do? -

Qt Code:
  1. QFile file("/TemperatureReadings/date.xls");
  2. file.open(IO_WriteOnly | IO_Translate | IO_Append);
To copy to clipboard, switch view to plain text mode 
I thought you want search the coputer drives for a that folder and file. Can't see that your code is doing that.

Since you want to learn something a little bit more elaborate:
  1. Get all drive names (Like c:, d:, f: etc.)
  2. Construct the path depending on the drives
  3. Check for file.


QDir::drives returns a list of QFileInfos. See QList on how to iterate over a list. For each drive construct the path for drive (one list entry) and your specified folder and file name. (QDir::separator() is useful). Check if the file exist via QFile::exists(). If it exist, read it.