DIR output only with path/file.ext no drive

April 24, 2011 at 18:38:20
Specs: Windows XP
Can i create a DIR output without the drive but with the rest of the path and file info.
For example using this command:
dir *.* /a-D /b/s |findstr "mp3 wma" > "playlist.m3u"

This creates:
C:\Documents and Settings\Administrador\Desktop\Music Name.mp3

I want
Documents and Settings\Administrador\Desktop\Music Name.mp3

So
So without the C:\

Is that possible?


See More: DIR output only with path/file.ext no drive

Report •


#1
April 24, 2011 at 23:08:31
Maybe:

(
    for /f "tokens=1* delims=\" %%a in ('dir /s/b/a-d *.mp3 *.wma') do @echo %%~b
) > "playlist.m3u"

It won't work on network paths.


Report •
Related Solutions


Ask Question