79565236

Date: 2025-04-09 19:56:19
Score: 1
Natty:
Report link

Oops figured it out!

@echo off
setlocal enabledelayedexpansion

REM Set the path to your CSV file
set "file=C:\Users\arod\Desktop\fruit.txt"

REM Read the file line by line
for /f "tokens=1,2 delims=," %%A in (%file%) do (
    set "fruit=%%A"
    set "quantity=%%B"
    echo Fruit: !fruit! - Sold: !quantity!
)

endlocal
pause
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Pe Me