The 2>NUL is redirecting output.
By default the '>' symbol will redirect output from STDOUT which is usually
non-error messages meant for the screen. You can redirect to a file with ">filename" which is the same as "1>filename", or you can redirect the output to the "black hole" of NUL with ">NUL". But besides STDOUT, there is also STDERR, which are error messages and are separate from STDOUT. To redirect error messages, you use "2>". If you want to redirect both standard and error messages to NUL you can use ">NUL 2>&1" which basically means send STDIO to NUL and send STDERR to the same handle as "1>".
Here is more info on redirection:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspxThe "delims=" in a FOR statement means there are no delimeters, so everything on the entire line will be placed into the variable. This is used if you don't want to break the line apart, but keep it all togehter. In the case of your question, it was used to deal with any possible spaces in the file names.
I hope that clears things up a little bit.