How to get the path of a file in text -


i have variable

set = %1 

%1 d:\work\temp_h.txt

i want path "d:\work". if use below code can name of path

%%~nxi  

%%~nxi= temp_h.txt. how can path of ? ( d:\work )

%~i expands %i removing surrounding quotes (") %~fi    expands %i qualified path name %~di    expands %i drive letter %~pi    expands %i path %~ni    expands %i file name %~xi    expands %i file extension %~si    expanded path contains short names %~ai    expands %i file attributes of file %~ti    expands %i date/time of file 

these of modifiers can used. in case can use %~dp1


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -