Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,294 of 68,980    |
|    sandeepshampur@gmail.com to All    |
|    String replacement not working    |
|    16 Sep 18 23:26:47    |
      I am trying to do a string replacement in a batch file and it is not working.       What am I doing wrong? All I want to accomplish is to remove the thousand       comma separators in the number              ===============Script===============       @echo off              for /f "tokens=1,2,4,5,7,8 delims=;" %%A in (Test.csv) do (              set myAmt=%%D:,=%       echo D : %%D       echo Amount : %myAmt%       )       ===============Script===============              ================Test.csv file========       A;B;C;D;-1,00,194.00;F;F;G       A;B;C;D;-1,000.00;F;F;G       ================Test.csv file========              ===============Output===============       D : -1,00,194.00       Amount : 1,00,194.00:,=       D : -1,000.00       Amount : 1,00,194.00:,=       ===============Output===============              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca