Quotes problem
Posted: 15 Aug 2007 15:11
Hi, I am troubled with this problem, please help.
let s assume the batch file called cityear.bat contains the following:
:::start of file
@ECHO OFF
SET cn=Nabeul
FOR %%Y IN (0203 0304 0405 0506) DO (
ECHO "define !ville () '%cn%' !enddefine."> cityear_%%Y.sps
ECHO "define !annee () '%%Y' !endefine. " >> cityear_%%Y.sps
ECHO "define !sannee () %%Y !enddefine." >>cityear_%%Y.sps
)
SET cn=
:::END of file
----------------------
After this I get 4 files:
cityear_0203.sps
cityear_0304.sps
cityear_0405.sps
cityear_0506.sps
each one contains (for example cityear_0203.sps):
"define !ville () 'Nabeul' !enddefine."
"define !annee () '0203' !endefine. "
"define !sannee () 0203 !enddefine."
----------------------------------------------
the question is I want the same output WITHOUT THE DOUBLE QUOTES("):
define !ville () 'Nabeul' !enddefine.
define !annee () '0203' !endefine.
define !sannee () 0203 !enddefine.
Please if you know how to do it directly from the cityear.bat file inside the for loop, let me know, OR also if you know a way to scan the output files and remove the double quotes...All is fine...THanks a lot
let s assume the batch file called cityear.bat contains the following:
:::start of file
@ECHO OFF
SET cn=Nabeul
FOR %%Y IN (0203 0304 0405 0506) DO (
ECHO "define !ville () '%cn%' !enddefine."> cityear_%%Y.sps
ECHO "define !annee () '%%Y' !endefine. " >> cityear_%%Y.sps
ECHO "define !sannee () %%Y !enddefine." >>cityear_%%Y.sps
)
SET cn=
:::END of file
----------------------
After this I get 4 files:
cityear_0203.sps
cityear_0304.sps
cityear_0405.sps
cityear_0506.sps
each one contains (for example cityear_0203.sps):
"define !ville () 'Nabeul' !enddefine."
"define !annee () '0203' !endefine. "
"define !sannee () 0203 !enddefine."
----------------------------------------------
the question is I want the same output WITHOUT THE DOUBLE QUOTES("):
define !ville () 'Nabeul' !enddefine.
define !annee () '0203' !endefine.
define !sannee () 0203 !enddefine.
Please if you know how to do it directly from the cityear.bat file inside the for loop, let me know, OR also if you know a way to scan the output files and remove the double quotes...All is fine...THanks a lot