New
#11
Well, I gave up... sort of.
I finished fooling around with batch scripts, but still could not find a clean way to break the loop (a problem with command)
I thought that PowerShell might be a better option and did some research, but did not write anything for you to use. I spent too much time with batch and thought "Hey maybe if I just point SevenDP to PowerShell, he/she might be able to figure it out from there - the OP seems intelligent enough".
Here are some links that might get you started. I don't think PowerShell has the same problem with breaking out of loops that the command shell has.
Windows PowerShell Owner's Manual
Scripting with Windows PowerShell
Windows PowerShell Scripting
Loop examples
ForEach | PowerShell | SS64.com
powershell - Loop X number of times - Stack Overflow
Hey, Scripting Guy! How Can I Loop Through Collections with Windows PowerShell? - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
The attached batch file is something you can paly with if you wish, but you'll be better off spending the time on Powershell.
If you don't understand something in the batch file (not well documented) ask and I'll try to explain what I wanted it to do. It's somewhat convoluted in the recursion call and I had to just exit the batch file to break the loop.
Run some tests (it only moves 3 files but there is a variable you can change) I think I left all of the echos on, so the output isn't' pretty.
Bill
.