Can I store the output of a command in a variable in batch scripting? -



Can I store the output of a command in a variable in batch scripting? -

i want dir folder , in variable names of *.csv files.

does know how can this?

using bash can try:

dirlist=`ls -1 *.csv` echo "$dirlist"

under windows can read next q , a:

windows batch files: how set variable result of command?

something like:

for /f "delims=" %%a in ('dir') @set foobar=%%a

change 'dir' want. have no windows machine close by, cannot test.

batch-file

Comments

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -