You need a sed program. This version uses ssed. A real sed could need more or less \ before the “special” signs such as (.
Type this code into vcf-2-csv.cmd and run it as vcf-2-csv filename.vcf It will produce filename.csv
echo This script converts VCF files from RoundCube mail to CSV files you can open with LibreOffice or Excel. echo This script requires SED or SSED echo (this version uses ssed from https://sourceforge.net/projects/super-sed-for-windows/) type %1 |ssed -ne "/^N:/{;s/.$//;h;};/^EMAIL/{;s/^.*:\([^:]*[0-9A-Za-z]\)[^0-9A-zA-Z]*$/\1/g;G;s/\n/:/g;s/^\([^:]*\):N:\(.*\);;$/\2:\1/g;s/:/;/g;p;}" > %1.csv