I looked up for /?
%~fsI is to expand %I to the full path name containing only the short name.
Through experimentation
SET WL_HOME=C:\bea\weblogic91
FOR %%i IN ("%WL_HOME%") DO SET WL_HOME=%%~fsi
echo %WL_HOME%
pause
It shows WL_HOME=C:\bea\WEBLOG~1
I don't know how to explain the sentence "expand %I to the full path name containing only the short name"
Let's explain: In Windows, for a long file or directory name, there is a corresponding short name. For example, "weblogic91" has a short name "WEBLOG~1". When using %~fsI in a for loop, it takes the variable %I (here it's "%WL_HOME%") and expands it to the full path but using the short name part. So in the example, %WL_HOME% is "C:\bea\weblogic91", and when processed with %%~fsi, it becomes the full path with the short name part, so it's "C:\bea\WEBLOG~1".
%~fsI is to expand %I to the full path name containing only the short name.
Through experimentation
SET WL_HOME=C:\bea\weblogic91
FOR %%i IN ("%WL_HOME%") DO SET WL_HOME=%%~fsi
echo %WL_HOME%
pause
It shows WL_HOME=C:\bea\WEBLOG~1
I don't know how to explain the sentence "expand %I to the full path name containing only the short name"
Let's explain: In Windows, for a long file or directory name, there is a corresponding short name. For example, "weblogic91" has a short name "WEBLOG~1". When using %~fsI in a for loop, it takes the variable %I (here it's "%WL_HOME%") and expands it to the full path but using the short name part. So in the example, %WL_HOME% is "C:\bea\weblogic91", and when processed with %%~fsi, it becomes the full path with the short name part, so it's "C:\bea\WEBLOG~1".
