How to create an IF condition using BATCH FILES which compares if one folder is bigger than another?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
guilhegm
Posts: 1
Joined: 14 Mar 2017 06:01

How to create an IF condition using BATCH FILES which compares if one folder is bigger than another?

#1 Post by guilhegm » 14 Mar 2017 06:07

Good morning my friends, the title says it all haha I'm not a programmer, I'm just a brazilian intern on the control area and my boss asked me to do this but I have no idea how, but I'm trying!

Well what I wrote is basically this:

Code: Select all

if %C:\Users\apta\Desktop\Copia\New folder% GTR %C:\Users\apta\Desktop\Copiaaa\New folder% (
echo msgbox "Arquivo Novo" > %tmp%\tmp.vbs cscript /nologo %tmp%\tmp.vbs del %tmp%\tmp.vbs )


It will show a pop up message everytime the first folder is greater(has more files) than the other. Thanks for anyone that can help or at least read till here.
Cheers!


Post Reply