i am running the following command from cmd.exe using batch file.
forfiles /p C:\Users\subhamt\Downloads /m embeddedsection.zip /c "cmd /c echo @fsize"
what i wish to do is that i want to save the output of the command in to a variable for that i changed the above command to :
set var=forfiles /p C:\Users\subhamt\Downloads /m embeddedsection.zip /c "cmd /c echo @fsize"
but when i do on echo on var then it gives me the above commadnd itself as an output. can someone please point what i am doing wrong.
i went through the following links and some more but they didnt solve the problem i have at hand.
Can I store the output of a command in a variable in batch scripting?