I see many examples of using% nx1 to get only the name of the file transferred along with% 1.
But what if you have another variable set using the file path and want to programmatically get the file name from this
for instance
@echo off SET MYPATH="c:\program files\myapp\somefile.ext" SET MYPATHFILE = ??
I am trying to get only "somefile.ext". I tried replacing 1 with var
%nxMYPATH
But that does not work.
source share