echo text %% [SOLVED]

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
deniscalanca
Posts: 11
Joined: 26 Oct 2017 11:30

echo text %% [SOLVED]

#1 Post by deniscalanca » 28 Aug 2018 11:39

Hello, I'm building a batch file that will generate a new .cmd file, I need to send it to this new file through echo:

for / l %% w in (1,1,20) do mode with: cols = 67 lines = %% w

more in the new file comes out as follows:

for /l % w in (1,1,20) do mode with: cols = 67 lines = % w

How to send through the echo command %%?
Last edited by deniscalanca on 28 Aug 2018 11:49, edited 2 times in total.

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: echo text %%

#2 Post by Squashman » 28 Aug 2018 11:41

Double the percent symbols.

Code: Select all

echo for /l %%%%w in (1,1,20) do mode con:cols=67 lines=%%%%w>mybat.bat

deniscalanca
Posts: 11
Joined: 26 Oct 2017 11:30

Re: echo text %%

#3 Post by deniscalanca » 28 Aug 2018 11:51

Squashman wrote:
28 Aug 2018 11:41
Double the percent symbols.

Code: Select all

echo for /l %%%%w in (1,1,20) do mode con:cols=67 lines=%%%%w>mybat.bat
Thank you very much.

Post Reply