Thursday 18 September 2008

recursive for loops

problem: for example, reading a text file input, searching for the entry in a database and outputting specified csv's

what im not doing: hitting this with vbs, because vbs is only for when batch cant do it


try it, recursive for loops arent supported in winxp cmd / batch files, but here is a wee workaround

for /f %%a in (list.csv) do call :list %%a
:list
if not %1'==' for /f "tokens=1-5* delims=," %%a in ('findstr /i %1 db') do echo %%~c,%%~d,%%~e >> summary.csv

save the batch and watch it recurse!

winxp sucks again

slightly different post here, but ive not really been on for a while, but got to highlight this!

got
this message and here is the proof


now, you will notice that all of the google results feature either vista or enhanced ie7 issues, generally with network shares, but i got this when trying to extract a file from a compressed archive within another compressed archive, a zip within a zip if you will. now, i know that it was poor practice but that is how the file arrived.

also, do you want to move or copy files from this zone, yes / no? move or copy? yes or no? this is almost nonsensical to me...