|
Re: Shell - Get short file names for environment variable
Thanks very much for you fast answer!
Could you please explain, what you are doing here?
Thanks!
"Pegasus (MVP)" <I.can@fly.com.oz> schrieb im Newsbeitrag
news:u%23DYLxpXIHA.5132@TK2MSFTNGP02.phx.gbl...
>
> "Markus Eßmayr" <essmayr/at/racon-linz.at> wrote in message
> news:el4kPmpXIHA.4880@TK2MSFTNGP03.phx.gbl...
>> Hello,
>>
>> I have a batch file something like that:
>>
>> @echo off
>> set SOMEIMPORTANTFILE=C:\Program Files\Some Directory With
>> Spaces\file.dat
>> app1.exe "%SOMEIMPORTANTFILE%"
>> app2.exe "%SOMEIMPORTANTFILE%"
>> app3.exe "%SOMEIMPORTANTFILE%"
>>
>> Now I also should add to call another application, which in no case
>> supports spaces in file names.
>>
>> Is there a way similar to using %~s1 for converting %1 to a short file
>> name?
>>
>> Thanks!
>> Max
>>
>
> You could use this little batch file:
> @echo off
> set SomeImportantFolder=c:\Program Files\Microsoft Office
> pushd "%SomeImportantFolder%"
> echo Q > "%temp%\debug.scr%"
> debug < "%temp%\debug.scr%" > nul
> set wd=%cd%
> echo The 8.3 path is %wd%
> popd
>
|