Using a simple batch file, compatible with the command processor in Windows 7, how can one detect if a folder has any contents (meaning one or more files or subfolders, i.e. not empty)?
I tried:
IF EXIST C:\FOLDERNAME\* GOTO ROUTINE
But this always returns TRUE
and thus goes to ROUTINE
.
How can this be accomplished?