Page 1 of 1
delete the last caracter for each line of the generated file
Posted: 10 Feb 2020 03:19
by mkatih
Hello all

,
I have a DOS Batch that export data from an application,
After this export I get a ".csv" that end by a semicolon,
I want to delete this semicolon for each line,
Thanks in advance,
Re: delete the last caracter for each line of the generated file
Posted: 11 Feb 2020 07:58
by penpen
If your DOS Batch exports the data, just change that part of the code that prints the line and avoid the semicolon at the end of the line or remove it:
Code: Select all
:: sample code removing the last character of a line in environment variable
set "line=Test line;"
echo(%line:~0,-1%
penpen
Re: delete the last caracter for each line of the generated file
Posted: 11 Feb 2020 08:33
by Squashman
mkatih wrote: ↑10 Feb 2020 03:19
Hello all

,
I have a DOS Batch that export data from an application,
After this export I get a ".csv" that end by a semicolon,
I want to delete this semicolon for each line,
Thanks in advance,
Please show us the code you are already using so we are not guessing at any possible solutions to your problem.