thx I used :endloop2 if not defined name echo Nothing left to delete. && goto end this works great if the folder measuringresults is empty before running the file. If however the folder contains subdirectory A, B and C and the diskspace is too small then name = A A gets deleted name = B B ge...
Thanks man! I got to the following code, and it's very close to what I want. The line you gave me to skip the list file didn't work, but this one does @echo off color f0 :begin fsutil volume diskfree c: > C:\temp.txt setlocal for /f "tokens=1*" %%a in (C:\temp.txt) do ( set vri...
Hi guys I'm new here and not used to writing batch files I tried writing a file that does the following start: IF the free diskspace on C:\ is over 2GB do nothing ELSE delete the alfabetically first subdirectory of C:\measuringresults jump to start END IF END I created the following file NOTE that t...