cmd - Code in Command prompt doesn't work in batch file -
the code below want when execute in command prompt not when put in .bat file , try execute it:
for /f %a in ('dir /b *.csv') /f "tokens=*" %b in (%a) echo %b,%a >> all.csv what missing. there way have without displaying every step in loop in command prompt window. excuse me newbie!
in batch files - opposed @ command prompt - for variables require two %% signs, e.g. %%a.
to turn off echoing of commands they're being executed, place following line @ top batch file: @echo off
note prepending @ ad-hoc way of suppressing command echoing; in case used prevent echo off being echoed.
Comments
Post a Comment