diff --git a/autotest.cmd b/autotest.cmd
index f0e2b6ba1159ef769f3d87192e995f8556e40f9c..5f1b1ae3a1d296a76f0e9444254e569a58628422 100644
--- a/autotest.cmd
+++ b/autotest.cmd
@@ -118,7 +118,9 @@ goto:eof
 	md coverage-html-%~1
 	php -f enable_all.php
         :: no external files on windows for now
+        cd ..
         php occ app:disable files_external
+        cd tests
 
 	call phpunit --bootstrap bootstrap.php --configuration phpunit-autotest.xml --log-junit autotest-results-%~1.xml --coverage-clover autotest-clover-%~1.xml --coverage-html coverage-html-%~1