Hy guys, i'm needing some help.
I'm trying to create an automation here. This automation will create a file that also has DOS commmands. The problem is; when I try to insert some DOS files, the output has no isses, but, when I insert the string %, the DOS ignore as characters and works with it like a DOS command.
Script
echo %Test > Teste.txt
Output
Test
Expected output
%Test
Is it posible to make DOS interpret %Test as string and not as a command?
PS: I already tested the line using ^, but this does not solve the issue, DOS keep ignoring the char even using the ^
Thanks in advance.
Insert the string '%' (percent) in the echo output
Moderator: DosItHelp
-
- Posts: 2
- Joined: 21 Nov 2013 05:48
-
- Posts: 2
- Joined: 21 Nov 2013 05:48
Re: Insert the string '%' (percent) in the echo output
Hi foxidrive, solved the issue.
Thanks a lot for your help man, save-me a lot of hours of work.
Have a nice day. XD
Thanks a lot for your help man, save-me a lot of hours of work.
Have a nice day. XD
-
- Posts: 10
- Joined: 21 Nov 2013 01:07
Re: Insert the string '%' (percent) in the echo output
Hi Guys let me know that how to Insert a Percent Symbol Beside a PHP String...?
Re: Insert the string '%' (percent) in the echo output
Do you want to echo tags and stuff?
See here:
See here:
Code: Select all
@echo off
set "variable=<blah>20%%</blah>"
for /f "delims=" %%a in ("%variable%") do >file.txt echo(%%a