I want to list the files in a folder but not sub-folders. DIR enables you to list specific types of files (hidden, archive ready etc) and also only folders but
DIR
You want the /A-D option:
/A-D
for /f %%a in ('dir /A-D /b %csvPath%') do ( )