This doesn't work correctly:
@echo off
dir /B *.txt
set X=%1
set Y=%2
echo %X%
echo %Y%
pause > nul
It can't "set" this way so of course it won't "echo". But how do i get it to "set" X equal to the first file that it displays, and Y to the second file it displays?
I know this is simple but i fail to know exactly how to use "for" which is what i think is needed, but I'm not sure.