I have been tinkering with some batch files to clean up some of my folders and I am stuck. What I am trying to do is check the directory Installers for any files or folders and then either :goto empty or :goto notempty . I have spent ages searching for a solution but everything that I have found is to either check if only files exist in a directory or check if a specified folder exists in a directory.
EDIT: This is what I have so far.
@echo off
echo Beginning File Cleanup
echo Installers Start
"C:\Program Files\WinRAR\rar.exe" a -r -df "Installers.rar" Installers
echo Installers Done
echo old Start
"C:\Program Files\WinRAR\rar.exe" a -r -df "old.rar" old
echo old Done
mkdir Installers
mkdir old
pause
The code above works but I only want it to run the rar.exe bit if the folder is empty hence to :goto requirement Thanks