Is there an easy way to get to the basename (file name without extension) of a DOS file name using the DOS BAT command language?
I agree: format c:\
is probably a good start, followed by a bootable Linux CD (assuming these antique machines have a CD reader - not a given). But let's pretend that we only have DOS... (That means: not Windows - not even Windows 3.1, let alone Windows 95, 98, NT, ME, XP, Vista, 7, etc.)
For command-line
for /F %i in ("c:\foo\bar.txt") do @echo %~ni
For .bat Files
for /F %%i in ("c:\foo\bar.txt") do @echo %%~ni
output: bar
space
, use @ciantic's version.(Further Reading: http://www.computerhope.com/forhlp.htm )