So I'm creating a script that will make my life a little easier as a tech. The idea is that a command to uninstall runs and will remove the contents of the folder. So if that folder is empty it will continue on.
This loop should check if directory is empty and if not it should wait 60 seconds and then loop again.
for /F %%f in ('dir /A "C:\Test\*.*"') do (
echo Waiting on uninstall to complete...
timeout 60
)
I created a test directory filled it with a word document, but i've noticed it will loop 5-10 times then exit the loop down the rest of the program.
Anything helps