code:
FOR /f "delims=" %%G IN ('dir /b') DO (
echo %%~nG
echo MY NAME IS SONICSAM AND I ROCK
echo %%~nG >> poop.txt
)
Notice the ~n, it removes the file extenson
There should be no need to set it to something else with this code, and I am not even sure setting it inside ()'s will even work...but the %%~n will allow you to do whatever you wanted with the original code.