I tried your code for my .csv file with (,) as delimiter using the below code and i got output file with no data. Can you pls help if i am missing anything here to delete my last column out of 12 columns.
================================================================================================================
@echo off
setlocal EnableDelayedExpansion
(for /f "delims=" %%x in (MonthlyRecon_Actual.csv) do (
set "line=%%x"
for /F "tokens=1-5* delims=|" %%a in ("!line:,=|,!") do (
set "line=%%a%%b%%c%%d%%f"
)
echo !line:|=!
))>>MonthlyRecon_Actual_out.csv
===================================================================================================================