I'm making a program to organize some files into a "dictionary" that i can use, so instead of having to go through hundreds of folders and sub-forders, its all presented in a more clear way.
I have this function_sub that it's called every folder and that calls function_count that counts the amount of files and writes it to a temp file (Count.txt), for testing i have it echo out the variables %%A, %%B and %total% but for whatever reason when writing %total% it says "Echo is off" this means that it is not getting set, which souldn't happen since the type command that appears before writes the correct value.
:FUNCTION_SUB
for /d %%B IN (*) DO (
echo - %%B
pushd %%B
call :FUNCTION_COUNT
popd
type Count.txt
@set /p total=<Count.txt
echo ----------
echo %%A
echo %%B
echo %total%
echo ----------
)
goto :eof
Is there any limit to what the command @set is capable of doing?
I know there's a way of doing the same thing with a for loop but it can't happen here (or at least I wasn't able to do it) since it's already inside a loop, and I would like for all code to run in a single script.