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

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -