Finding short file names?

Archived from groups: microsoft.public.windowsxp.general (More info?)

How do I find the DOS file name of one of my files? In Win98, I could find
this in the file properties box.
22 answers Last reply
More about finding short file names
  1. Archived from groups: microsoft.public.windowsxp.general (More info?)

    use the find command

    FIND [/V] [/C] [/N] "string" [[drive:][path]filename[ ...]]

    /V Displays all lines NOT containing the specified string.
    /C Displays only the count of lines containing the string.
    /N Displays line numbers with the displayed lines.
    /I Ignores the case of characters when searching for the string.
    "string" Specifies the text string to find.
    [drive:][path]filename Specifies a file or files to search

    For example

    find "hope" *.txt

    This would search for any text file (.txt) that contains the text hope in
    the current directory.

    "mevian" wrote:

    > How do I find the DOS file name of one of my files? In Win98, I could find
    > this in the file properties box.
  2. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Thanks for your quick response! But I guess I didn't make myself clear.

    I know the "long" file name, I even know where it is. It's a txt file in a
    folder in My Documents. But I need to use its DOS path\name to tell a DOS
    program to use it.

    In Win98, the file properties box used to give me the DOS path. But that
    item is not there in WinXP.

    I guess I could give the file an 8-char name and put it in the root directory.

    "WarOfGenesis" wrote:

    > use the find command
    >
    > FIND [/V] [/C] [/N] "string" [[drive:][path]filename[ ...]]
    >
    > /V Displays all lines NOT containing the specified string.
    > /C Displays only the count of lines containing the string.
    > /N Displays line numbers with the displayed lines.
    > /I Ignores the case of characters when searching for the string.
    > "string" Specifies the text string to find.
    > [drive:][path]filename Specifies a file or files to search
    >
    > For example
    >
    > find "hope" *.txt
    >
    > This would search for any text file (.txt) that contains the text hope in
    > the current directory.
    >
    > "mevian" wrote:
    >
    > > How do I find the DOS file name of one of my files? In Win98, I could find
    > > this in the file properties box.
  3. Archived from groups: microsoft.public.windowsxp.general (More info?)

    umm, then again you can use windows search and in the are called
    "all or part of the file name" type in

    *.* (file extenson) for e.g. *.* txt

    this a wild card this will bring all the text files, if know the path just
    look in that folder

    "mevian" wrote:

    > Thanks for your quick response! But I guess I didn't make myself clear.
    >
    > I know the "long" file name, I even know where it is. It's a txt file in a
    > folder in My Documents. But I need to use its DOS path\name to tell a DOS
    > program to use it.
    >
    > In Win98, the file properties box used to give me the DOS path. But that
    > item is not there in WinXP.
    >
    > I guess I could give the file an 8-char name and put it in the root directory.
    >
    > "WarOfGenesis" wrote:
    >
    > > use the find command
    > >
    > > FIND [/V] [/C] [/N] "string" [[drive:][path]filename[ ...]]
    > >
    > > /V Displays all lines NOT containing the specified string.
    > > /C Displays only the count of lines containing the string.
    > > /N Displays line numbers with the displayed lines.
    > > /I Ignores the case of characters when searching for the string.
    > > "string" Specifies the text string to find.
    > > [drive:][path]filename Specifies a file or files to search
    > >
    > > For example
    > >
    > > find "hope" *.txt
    > >
    > > This would search for any text file (.txt) that contains the text hope in
    > > the current directory.
    > >
    > > "mevian" wrote:
    > >
    > > > How do I find the DOS file name of one of my files? In Win98, I could find
    > > > this in the file properties box.
  4. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Entering Dir /? at the command prompt results in a listing that includes
    the explaination for the /X switch output. I suggest

    dir *.* /X


    mevian wrote:

    > Thanks for your quick response! But I guess I didn't make myself clear.
    >
    > I know the "long" file name, I even know where it is. It's a txt file in a
    > folder in My Documents. But I need to use its DOS path\name to tell a DOS
    > program to use it.
    >
    > In Win98, the file properties box used to give me the DOS path. But that
    > item is not there in WinXP.
    >
    > I guess I could give the file an 8-char name and put it in the root directory.
    >
    > "WarOfGenesis" wrote:
    >
    >
    >>use the find command
    >>
    >>FIND [/V] [/C] [/N] "string" [[drive:][path]filename[ ...]]
    >>
    >>/V Displays all lines NOT containing the specified string.
    >>/C Displays only the count of lines containing the string.
    >>/N Displays line numbers with the displayed lines.
    >>/I Ignores the case of characters when searching for the string.
    >>"string" Specifies the text string to find.
    >>[drive:][path]filename Specifies a file or files to search
    >>
    >>For example
    >>
    >>find "hope" *.txt
    >>
    >>This would search for any text file (.txt) that contains the text hope in
    >>the current directory.
    >>
    >>"mevian" wrote:
    >>
    >>
    >>>How do I find the DOS file name of one of my files? In Win98, I could find
    >>>this in the file properties box.
  5. Archived from groups: microsoft.public.windowsxp.general (More info?)

    thiswasmyquestion.jpg = thiswa~1~.jpg

    The first 6 characters + tilde (~) plus 1 (if there is more that one file
    with the same first 6 characters - then 2 etc) plus the file extension

    --
    Regards,

    Richard Urban

    If you knew as much as you thought you know,
    You would realize that you don't know what you thought you knew!


    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    > How do I find the DOS file name of one of my files? In Win98, I could
    > find
    > this in the file properties box.
  6. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Right. But since files in "My Documents" are quite a few levels down in the
    directory tree (especially since I use folders and sometimes sub-folders
    within My Docs), that means a lot of counting of letters to recreate the full
    pathname in short form. I was hoping there was a place in WinXP where I
    could just cut&paste the full short name, like there is in Win98. I guess
    not.
  7. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Correction!

    thiswasmyquestion.jpg = thiswa~1.jpg


    --
    Regards,

    Richard Urban

    If you knew as much as you thought you know,
    You would realize that you don't know what you thought you knew!


    "Richard Urban" <richardurbanREMOVETHIS@hotmail.com> wrote in message
    news:eyAAr9PfFHA.2444@tk2msftngp13.phx.gbl...
    > thiswasmyquestion.jpg = thiswa~1~.jpg
    >
    > The first 6 characters + tilde (~) plus 1 (if there is more that one file
    > with the same first 6 characters - then 2 etc) plus the file extension
    >
    > --
    > Regards,
    >
    > Richard Urban
    >
    > If you knew as much as you thought you know,
    > You would realize that you don't know what you thought you knew!
    >
    >
    > "mevian" <mevian@discussions.microsoft.com> wrote in message
    > news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    >> How do I find the DOS file name of one of my files? In Win98, I could
    >> find
    >> this in the file properties box.
    >
    >
  8. Archived from groups: microsoft.public.windowsxp.general (More info?)

    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    > How do I find the DOS file name of one of my files? In Win98, I could
    > find
    > this in the file properties box.

    How about openining a DOS window? Navigate to the directory with the file in
    it, and get a directory listing. /p will show a page of files at a time.
  9. Archived from groups: microsoft.public.windowsxp.general (More info?)

    dir /x

    --
    George Hester
    _______________________________
    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    > How do I find the DOS file name of one of my files? In Win98, I could
    find
    > this in the file properties box.
  10. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Nice. Thanks David.

    --
    George Hester
    _______________________________
    "David Candy" <.> wrote in message
    news:#c4a5zRfFHA.2384@TK2MSFTNGP15.phx.gbl...
    Place attached file into the sendto folder.


    On Error Resume Next
    Set Sh = WScript.CreateObject("WScript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Ag=Wscript.Arguments
    Set file = fso.GetFile(Ag(0))
    If Err.Number=53 then
    Err.Clear
    Set file = fso.GetFolder(Ag(0))
    End If
    A=InputBox(File.name & vbcrlf & "short file name is", "Show Short Filename",
    file.shortname)
    --
    ----------------------------------------------------------------------------
    ----------------------
    http://webdiary.smh.com.au/archives/_comment/001075.html
    =================================================
    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    > How do I find the DOS file name of one of my files? In Win98, I could
    find
    > this in the file properties box.
  11. Archived from groups: microsoft.public.windowsxp.general (More info?)

    I like that one even better. Sometimes I have to reduce the length of my
    environment variables and 8.3 file names helps with that.

    --
    George Hester
    _______________________________
    "David Candy" <.> wrote in message
    news:#DiTYYcfFHA.3588@TK2MSFTNGP10.phx.gbl...
    This is short path rather than name.

    On Error Resume Next
    Set Sh = WScript.CreateObject("WScript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Ag=Wscript.Arguments
    Set file = fso.GetFile(Ag(0))
    If Err.Number=53 then
    Err.Clear
    Set file = fso.GetFolder(Ag(0))
    End If
    A=InputBox(File.name & vbcrlf & "short file path and name is", "Show Short
    Path", file.shortpath)
    --
    ----------------------------------------------------------------------------
    ----------------------
    http://webdiary.smh.com.au/archives/_comment/001075.html
    =================================================
    "George Hester" <hesterloli@hotmail.com> wrote in message
    news:e1W7oiafFHA.3436@tk2msftngp13.phx.gbl...
    > Nice. Thanks David.
    >
    > --
    > George Hester
    > _______________________________
    > "David Candy" <.> wrote in message
    > news:#c4a5zRfFHA.2384@TK2MSFTNGP15.phx.gbl...
    > Place attached file into the sendto folder.
    >
    >
    > On Error Resume Next
    > Set Sh = WScript.CreateObject("WScript.Shell")
    > Set fso = CreateObject("Scripting.FileSystemObject")
    > Set Ag=Wscript.Arguments
    > Set file = fso.GetFile(Ag(0))
    > If Err.Number=53 then
    > Err.Clear
    > Set file = fso.GetFolder(Ag(0))
    > End If
    > A=InputBox(File.name & vbcrlf & "short file name is", "Show Short
    Filename",
    > file.shortname)
    > --
    > --------------------------------------------------------------------------
    --
    > ----------------------
    > http://webdiary.smh.com.au/archives/_comment/001075.html
    > =================================================
    > "mevian" <mevian@discussions.microsoft.com> wrote in message
    > news:7F3C36A7-646E-407D-AD82-2521F88FD84D@microsoft.com...
    >> How do I find the DOS file name of one of my files? In Win98, I could
    > find
    >> this in the file properties box.
    >
  12. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Thanks for the suggestion. So, there's nothing I can do within the XP
    environment, without a VB script or sorting through a DOS directory listing?
    This may be the first instance where I've actually missed something about Win
    98. ;-)
  13. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Windows XP has migrated well past "short filenames". That was a restriction
    with fat16 file systems - NOT a benefit!

    Because Windows 98 was built on top of DOS (could use either fat16 or fat32)
    it is only natural that there was a built in capability to use short
    filenames (the 8.3 nomenclature) easily. There is no DOS in windows XP and
    therefore there is no need for short filenames.

    --
    Regards,

    Richard Urban

    If you knew as much as you thought you know,
    You would realize that you don't know what you thought you knew!


    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:815B3348-E0A9-41E1-AE31-BB188353D696@microsoft.com...
    > Thanks for the suggestion. So, there's nothing I can do within the XP
    > environment, without a VB script or sorting through a DOS directory
    > listing?
    > This may be the first instance where I've actually missed something about
    > Win
    > 98. ;-)
    >
  14. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Richard Urban wrote:
    >
    > Because Windows 98 was built on top of DOS (could use either fat16 or fat32)
    > it is only natural that there was a built in capability to use short
    > filenames (the 8.3 nomenclature) easily. There is no DOS in windows XP and
    > therefore there is no need for short filenames.

    Win3X was just another app that ran in dos 6.X

    Win9X isn't built on dos, dos is just used to start the system, much
    like the starter in your car. Win9x is it's own OS.


    --
    http://www.bootdisk.com/
  15. Archived from groups: microsoft.public.windowsxp.general (More info?)

    On Fri, 1 Jul 2005 22:46:46 -0400, "Richard Urban"
    <richardurbanREMOVETHIS@hotmail.com> wrote:

    >Windows XP has migrated well past "short filenames". That was a restriction
    >with fat16 file systems - NOT a benefit!
    >
    >Because Windows 98 was built on top of DOS (could use either fat16 or fat32)
    >it is only natural that there was a built in capability to use short
    >filenames (the 8.3 nomenclature) easily. There is no DOS in windows XP and
    >therefore there is no need for short filenames.

    Normally there is no need for them. However...

    It's still one of the reasons that doing a straight copy of a system
    partition can fail. While the kernel/drivers are loading they often
    refers to shortened file names (SFNs). They're all over the registry.

    When someone does a copy or xcopy of the system partition, the SFNs
    are recreated on the fly. The new ones, of course, often don't match
    the older registry entries.

    This is why programs like Dos32/Backmagic were created. They copy
    everything with the SFNs intact. The only logistic problem that may
    have induced MS NOT to keep them intact is that you'd have two
    possible types of name collisions when copying files into a non-empty
    folder: a dupe'd LFN which you're prompted for (overwrite/cancel) or a
    dupe'd SFN which would have baffled grandma.

    ---

    To the OP: As mentioned, 'Dir /x' does it via command line, but I
    believe the only way to display them in a normal folder window would
    be to write a 'Shell Extension.' This is done often when programmers
    need a column that shows specifics about a file (like the MP3 stats
    you can choose by R-clicking the header on a Details display).
    Unfortunately, I don't remember seeing one that was designed for SFNs.
    It's a good idea, and it could be done. Search CodeProject for key
    "Shell Extensions" if you have some programming chops and patience.
  16. Archived from groups: microsoft.public.windowsxp.general (More info?)

    I think you will find many here who will disagree with you (-:


    --
    Regards,

    Richard Urban

    If you knew as much as you thought you know,
    You would realize that you don't know what you thought you knew!


    "Plato" <|@|.|> wrote in message
    news:42c61058$0$84096$bb4e3ad8@newscene.com...
    > Richard Urban wrote:
    >>
    >> Because Windows 98 was built on top of DOS (could use either fat16 or
    >> fat32)
    >> it is only natural that there was a built in capability to use short
    >> filenames (the 8.3 nomenclature) easily. There is no DOS in windows XP
    >> and
    >> therefore there is no need for short filenames.
    >
    > Win3X was just another app that ran in dos 6.X
    >
    > Win9X isn't built on dos, dos is just used to start the system, much
    > like the starter in your car. Win9x is it's own OS.
    >
    >
    >
    >
    >
    >
    > --
    > http://www.bootdisk.com/
    >
    >
  17. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Richard Urban wrote:
    >
    > I think you will find many here who will disagree with you (-:

    Perhaps, but it's not worth too much arguing, either way, in any case.
    Old hat really :)
  18. Archived from groups: microsoft.public.windowsxp.general (More info?)

    The other way is using command.exe. Start | Run | command | OK. But no not
    in the File Properties in Windows Explorer.

    --
    George Hester
    _______________________________
    "mevian" <mevian@discussions.microsoft.com> wrote in message
    news:815B3348-E0A9-41E1-AE31-BB188353D696@microsoft.com...
    > Thanks for the suggestion. So, there's nothing I can do within the XP
    > environment, without a VB script or sorting through a DOS directory
    listing?
    > This may be the first instance where I've actually missed something about
    Win
    > 98. ;-)
    >
  19. Archived from groups: microsoft.public.windowsxp.general (More info?)

    Not true. There is a reason for 8.3 file names. I stated it earlier. To
    keep Environment Settings to a minimum length. Although there is no DOS in
    Windows XP there is still a DOS limit on the length of environment
    variables.

    --
    George Hester
    _______________________________
    "Richard Urban" <richardurbanREMOVETHIS@hotmail.com> wrote in message
    news:#ShSLBrfFHA.1284@TK2MSFTNGP14.phx.gbl...
    > Windows XP has migrated well past "short filenames". That was a
    restriction
    > with fat16 file systems - NOT a benefit!
    >
    > Because Windows 98 was built on top of DOS (could use either fat16 or
    fat32)
    > it is only natural that there was a built in capability to use short
    > filenames (the 8.3 nomenclature) easily. There is no DOS in windows XP and
    > therefore there is no need for short filenames.
    >
    > --
    > Regards,
    >
    > Richard Urban
    >
    > If you knew as much as you thought you know,
    > You would realize that you don't know what you thought you knew!
    >
    >
    > "mevian" <mevian@discussions.microsoft.com> wrote in message
    > news:815B3348-E0A9-41E1-AE31-BB188353D696@microsoft.com...
    > > Thanks for the suggestion. So, there's nothing I can do within the XP
    > > environment, without a VB script or sorting through a DOS directory
    > > listing?
    > > This may be the first instance where I've actually missed something
    about
    > > Win
    > > 98. ;-)
    > >
    >
    >
  20. Archived from groups: microsoft.public.windowsxp.general (More info?)

    From his spyware and virus infected Windoze box, George Hester had this to
    say:

    > Not true. There is a reason for 8.3 file names. I stated it earlier. To
    > keep Environment Settings to a minimum length. Although there is no DOS
    > in Windows XP there is still a DOS limit on the length of environment
    > variables.
    >
    And why would that be? If XP doesn't run on DOS or continue to have any DOS
    code within its source, why would it continue to carry this old baggage?
    How do the developers of XP explain this one and for what purpose would
    they retain this type of DOS restrictions on environmental settings?


    > --
    > George Hester


    --
    Get Microsoft PowerToys for Windows XP here:
    http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
    "A must-have for your Toy Operating System"
  21. Archived from groups: microsoft.public.windowsxp.general (More info?)

    I think it's a function of the IBM; the PC. I don't rightly know but the
    limit is there nonetheless. You can see it in COMPSPEC. It has a switch to
    increase the size. Trouble is when you do that nmake no longer works.

    --
    George Hester
    _______________________________
    "NoStop" <nostop@stopspam.com> wrote in message
    news:12Uxe.1860469$6l.453549@pd7tw2no...
    > From his spyware and virus infected Windoze box, George Hester had this to
    > say:
    >
    > > Not true. There is a reason for 8.3 file names. I stated it earlier.
    To
    > > keep Environment Settings to a minimum length. Although there is no DOS
    > > in Windows XP there is still a DOS limit on the length of environment
    > > variables.
    > >
    > And why would that be? If XP doesn't run on DOS or continue to have any
    DOS
    > code within its source, why would it continue to carry this old baggage?
    > How do the developers of XP explain this one and for what purpose would
    > they retain this type of DOS restrictions on environmental settings?
    >
    >
    > > --
    > > George Hester
    >
    >
    > --
    > Get Microsoft PowerToys for Windows XP here:
    > http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
    > "A must-have for your Toy Operating System"
    >
  22. Archived from groups: microsoft.public.windowsxp.general (More info?)

    From his spyware and virus infected Windoze box, Richard Urban had this to
    say:

    > Windows XP has migrated well past "short filenames". That was a
    > restriction with fat16 file systems - NOT a benefit!
    >
    > Because Windows 98 was built on top of DOS (could use either fat16 or
    > fat32) it is only natural that there was a built in capability to use
    > short filenames (the 8.3 nomenclature) easily. There is no DOS in windows
    > XP and therefore there is no need for short filenames.
    >
    Hi Richard,

    Remember when it was reported that some of the source code from W2K had made
    its way to the Net? Anyways, I happened to come across some of the source
    code which I'll attach below. Since XP has some of its roots in W2K, it's
    possible that this source code remains in XP. :-)

    W2K Source Code:

    #v+
    /* Source Code Windows */

    #include "win31.h"
    #include "win95.h"
    #include "win98.h"
    #include "workst~1.h"
    #include "evenmore.h"
    #include "oldstuff.h"
    #include "billrulz.h"
    #include "monopoly.h"
    #include "backdoor.h"
    #define INSTALL = HARD

    char make_prog_look_big(16000000);
    void main()
    {
    while(!CRASHED)
    {
    display_copyright_message();
    display_bill_rules_message();
    do_nothing_loop();

    if (first_time_installation)
    {
    make_100_megabyte_swapfile();
    do_nothing_loop();
    totally_screw_up_HPFS_file_system();
    search_and_destroy_the_rest_of-OS2();
    make_futile_attempt_to_damage_Linux();
    disable_Netscape();
    disable_RealPlayer();
    disable_Lotus_Products();
    hang_system();
    } //if
    write_something(anything);
    display_copyright_message();
    do_nothing_loop();
    do_some_stuff();

    if (still_not_crashed)
    {
    display_copyright_message();
    do_nothing_loop();
    basically_run_windows_31();
    do_nothing_loop();
    } // if
    } //while

    if (detect_cache())
    disable_cache();

    if (fast_cpu())
    {
    set_wait_states(lots);
    set_mouse(speed,very_slow);
    set_mouse(action,jumpy);
    set_mouse(reaction,sometimes);
    } //if

    /* printf("Welcome to Windows 3.1"); */
    /* printf("Welcome to Windows 3.11"); */
    /* printf("Welcome to Windows 95"); */
    /* printf("Welcome to Windows NT 3.0"); */
    /* printf("Welcome to Windows 98"); */
    /* printf("Welcome to Windows NT 4.0"); */
    printf("Welcome to Windows 2000");

    if (system_ok())
    crash(to_dos_prompt)
    else
    system_memory = open("a:\swp0001.swp",O_CREATE);

    while(something)
    {
    sleep(5);
    get_user_input();
    sleep(5);
    act_on_user_input();
    sleep(5);
    } // while
    create_general_protection_fault();

    } // main
    #v-


    --
    Get Microsoft PowerToys for Windows XP here:
    http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
    "A must-have for your Toy Operating System"
Ask a new question

Read More

DOS File Name Microsoft Windows XP