According to some tutorials I tried to replace a comma "," by a dot "." with the following instruction
set numvalue=9,23455
set numvalue=%numvalue:,=.%
...but it doesn't work.
How else can I achieve this?
How does the other way go?
replacing "," by "." or vice versa not working
Moderator: DosItHelp
Re: replacing "," by "." or vice versa not working
Well, it works for me:
Result:
Saso
Code: Select all
@echo off
set numvalue=9,23455
echo _%numvalue%_
set numvalue=%numvalue:,=.%
echo _%numvalue%_
Result:
Code: Select all
C:\>a.cmd
_9,23455_
_9.23455_
C:\>
Saso
Re: replacing "," by "." or vice versa not working
pstein wrote:According to some tutorials I tried to replace a comma "," by a dot "." with the following instruction
set numvalue=9,23455
set numvalue=%numvalue:,=.%
...but it doesn't work.
You must be doing it within a loop.
Re: replacing "," by "." or vice versa not working
After reboot it works now.
Thank you
Thank you
Re: replacing "," by "." or vice versa not working
First time I have seen a reboot cure a batch file.pstein wrote:After reboot it works now.
Thank you