Tom
Tom

Reputation: 139

echo line to >> fun.vbs

I create a file with a batch script. But I have a problem when I use %.

echo WshShell.SendKeys "%" >> fun.vbs

But when I check the vbs script I see this

WshShell.SendKeys "" 

How Can I place the '%' in the vbscript ?

Thanks for your reply !

Upvotes: 0

Views: 133

Answers (1)

akostadinov
akostadinov

Reputation: 18654

try double %, i.e. %%

Here is the link to where this is explained. Look at this site, it is an amazing reference for cmd.exe

btw I can't stop myself from recommending you learn linux and bash instead of cmd.exe if you have the choice.

Upvotes: 2

Related Questions