I think you can get away without a .bat by executing
Maybe you need to add some quotes...
Code:
%WINDIR%\System32\cmd.exe /c cd /d somefolder && windz input.dat > output.dat