call echo %var% ?
I feel like if
call echo %%var%%
Call once adds a pair of %
It seems..
I feel like if
call echo %%var%%
Call once adds a pair of %
It seems..
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
But I still declare
This kind of abbreviation is really uninteresting
First execute for and then execute echo %n%
It is simple and clear
And it won't have the above-mentioned problems I mentioned
Originally posted by plp626 at 2008-6-26 18:53:
There was such a heated discussion just about variable delay. I feel that the code of the thread starter is nothing new, which I often use when writing "subroutines".
But let me say something off-topic, the example the thread starter gave is not...
Originally posted by PPdos at 2008-6-25 19:51:
It is also possible to use the intermediate result
(for /f "tokens=*" %i in ('dir /b') do set /a n+=1 >nul&call set _%n%=%i >nul)&call echo There are %n% files(folders) in the directory
Paste the code into the command prompt and run it multiple times, and you will see that the number keeps increasing, which does not match the actual number of files(folders).
[ Last edited by asnahu on 2009-8-7 at 04:20 ]