Is there a program like Visual Studio that allows you to debug (dos) batch files? What techniques could I use to debug? Martin Brown answered a batch file question with a nice for / each loop. I would love to see the values of the variables as they loop.
for /R A %i IN (*.jpg) DO xcopy %i B /M
To print the values of the variables as they loop you could try:
If you want to stop and examine each line as it is executed try:
which will halt the script at each iteration.
Your example looks like a backup script for images;
If you make a script of this you can pipe all the output to a log file, just don’t forget to use %%i instead of %i if you’re not typing this at the shell.