in windows 7 .bat file can one get the long filename from a short one

specifically in a batch file in windows 7 one can use the line

set MYDIR=%~dps0%

to get the directory path containing the batch file.

On the windows 7 machine it contains generated 8.3 names for elements of the path.

Is there a way to get the "long filename" version of this path? from within a ".bat" file ??

-------------Problems Reply------------

Just get rid of the s.

set MYDIR=%~dp0

From for /?:

%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH
environment variable and expands %I to the
fully qualified name of the first one found.
If the environment variable name is not
defined or the file is not found by the
search, then this modifier expands to the
empty string

Category:windows Views:19 Time:2018-08-22

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.413 (s). 11 q(s)