diff --git a/Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h b/Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
index da15353acb81266ee411e0f17989bdc945996ae1..e3de7b7a49cab285f2b34657b2f98615582abf9d 100644
--- a/Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
@@ -43,7 +43,8 @@ public:
     std::getline( testFile, fileLine );
     TS_ASSERT_EQUALS ( fileLine, "-0.0105  -0.0735  6.13876e+08  6.1697e+07\r" );
 
-    // remove file created by this algorithm
+    // remove file created by this algorithm, closing it first as Windows gets tetchy about this
+    testFile.close();
     Poco::File(outputFile).remove();
   }
 };