Determining DOS filename of a Win 2000 file

  • Thread starter Thread starter Sue Parkhurst
  • Start date Start date
S

Sue Parkhurst

How can one determine the DOS 8.3 name of a Word 2000
file? We are using the ISYS 5 search program, which
indexes files based on the DOS file name. When we
encounter problems with a file, we can't determine which
file is causing the problem because we don't know how to
reconcile between the 8.3 name and the long name we use.

We would certainly appreciate any help! Thanks.
 
Sue said:
How can one determine the DOS 8.3 name of a Word 2000
file? We are using the ISYS 5 search program, which
indexes files based on the DOS file name. When we
encounter problems with a file, we can't determine which
file is causing the problem because we don't know how to
reconcile between the 8.3 name and the long name we use.

We would certainly appreciate any help! Thanks.

C:\cmd>rlist demo\ShowShortFileName.cmd
=====begin C:\cmd\demo\ShowShortFileName.cmd ====================
01. @echo off
02. setlocal
03. if [%2] neq [] (set LFN=%*) else (set LFN=%~1)
04. if defined LFN goto :TEST
05. set /p LFN="Type in the LONG name of the file: "
06. if not defined LFN goto :EOF
07. :TEST
08. if exist "%LFN%" goto :FOUND
09. echo/File "%LFN%" does not exist.&goto :EOF
10. :FOUND
11. for %%a in ("%LFN%") do @echo/The DOS (Short) name is %%~sfa
=====end C:\cmd\demo\ShowShortFileName.cmd ====================

C:\cmd>c:\cmd\demo\ShowShortFileName.cmd %temp%\the quick brown fox.txt
The DOS (Short) name is c:\Temp\THEQUI~1.TXT

C:\cmd>c:\cmd\demo\ShowShortFileName.cmd
Type in the LONG name of the file: c:\temp\the quick brown fox.doc
File "c:\temp\the quick brown fox.doc" does not exist.

C:\cmd>c:\cmd\demo\ShowShortFileName.cmd c:\cmd\demo\ShowShortFileName.cmd
The DOS (Short) name is c:\cmd\demo\SHOWSH~1.CMD

C:\cmd>c:\cmd\demo\ShowShortFileName.cmd
Type in the LONG name of the file: C:\Program Files\InstallShield Installation Information\{5CD29180-A95E-11D3-A4EB-00C04F7BDB2C}\Setup.ini

The DOS (Short) name is C:\PROGRA~1\INSTAL~1\{5CD29~1\Setup.ini
 
Back
Top