|
Answer» i'm trying to echo %1 %2 %3 into a file from a batch file, and i dont WANT the variable i want the percentile SYMBOLE and the number itself, how can i do this?
:VN9K0DM set v.1=%systemdrive%\+0340.cmd echo @echo off >%v.1% echo set c=0 >>%v.1% echo set v.v=%^1 >>%v.1% echo set v.a=%^2 >>%v.1% echo set v.b=%^3 >>%v.1% echo set v.c=%^4 >>%v.1% echo set v.d=%^5 >>%v.1% echo for /f "tokens=1 delims=*" %%a in ('dir /a %systemdrive%\%v.v% /b /s') do (>>%v.1% echo call set /a c=%%c%%+1 >>%v.1% echo call set c.%%c%%=%%a >>%v.1% echo )>>%v.1% echo %c^.1% %^v.a% %v^.b% %v^.c% %v.^d% >>%v.1%I'd add a routine to add the values after a ( forced hard "%" ), and then do a Line Return for the next forced %, and a Line Return and then % followed by the echo value to your *.txt or *.dat file that you create.
See it done before for passing values after names like:
Barb = 3 Tom = 4 Steve =7
Not sure if you will have to add a UNIQUE designator for the batch to tell appart each % from the other when commanding to drop after the % on the line....You shoudl be able to force it to skip over x many characters and drop the values or force it to drop the value on the 2nd line and 3RD line.
It wasnt bad with mine since it was different names that it had to pass values to that were unique from each other vs three % that could cause a headache if the batch just KEEPS finding the first % and dumping the values after it for %1, %2, and %3To echo one percent sign, you need two in the script.
Looking at your script, DaveLembke, you do like doing things the hard way, don't you?
|