Batch- Checking for IFs While Doing Something

October 6, 2010 at 12:40:17
Specs: Windows XP
I'm using a program called Wizard's Apprentice to create a GUI for my batch file.
The batch file just copies files from one spot to another while displaying a progress bar.
However, the progress bar has a 'Cancel' button on it, and I can't get the program to check if it's pressed while copying the files.
My code looks like this:

ECHO A | xcopy "%file%" "%location%"

When pressed, the cancel button sends out an Errorlevel 2, but I don't know how to check for
an errorlevel while it's copying the files. Anyone got any advice?
Thanks in advance. :)

See More: Batch- Checking for IFs While Doing Something

Report •

October 6, 2010 at 14:46:47
Don't think you can... Check with the wizards apprentice manual or see if they have a forums.

Normally you would just check for an errorlevel after the command has completed.

Can I put a question here?

Report •
Related Solutions

Ask Question