M
Michael Moser
My script gets passed the fully qualified (path & filename & extension)
of some file. How do I extract just the filename?
I found that variables in for-statements allow misc. extraction options,
e.g.:
for %%I in (%parameter%) do echo %~nI
echos just the filename (i.e. without extension) but the result still
contains the path, i.e. the echoed strings reads e.g.
"C:\foo\bar\filename" instead of just "filename".
How can I extract just the local filename of a file in a script?
Michael
of some file. How do I extract just the filename?
I found that variables in for-statements allow misc. extraction options,
e.g.:
for %%I in (%parameter%) do echo %~nI
echos just the filename (i.e. without extension) but the result still
contains the path, i.e. the echoed strings reads e.g.
"C:\foo\bar\filename" instead of just "filename".
How can I extract just the local filename of a file in a script?
Michael