Create a bat file from a bat file with "%date:/=%" as line in new bat file

Emil

I want to create a bat file(A.bat) from another bat file(AA.bat)

AA.bat
echo mkdir %date:/=%  > A.bat

A.bat
mkdir %date:/=% 

But when i execute AA.bat, A.bat is created but content is as below

mkdir 15-Apr-17 

How to get the content of A.bat as

 mkdir %date:/=% 
Emil

mkdir %%date:/=%%

To escape a single percent sign double it echo mkdir %%date:/=%% > A.bat – LotPings

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related