The FOR command has several built-in switches that allow you to modify file names. Try the following:
@echo off
for %%i in (*.*) do echo "%%~xi"
For further details, use help for
to get a complete list of the modifiers - there are quite a few!
Sam
2008-09-26 11:22:49