Windows 10: Windows 10 dir search using wild char "?" is not returning expected output

Discus and support Windows 10 dir search using wild char "?" is not returning expected output in Windows 10 Network and Sharing to solve the problem; Hi, I noticed some strange behavior when I did directory search using command line with wild char "?". Wild char "?" is supposed to match any single... Discussion in 'Windows 10 Network and Sharing' started by VBahirji, Jun 8, 2020.

  1. VBahirji Win User

    Windows 10 dir search using wild char "?" is not returning expected output


    Hi,


    I noticed some strange behavior when I did directory search using command line with wild char "?". Wild char "?" is supposed to match any single character so e.g. if you use "??" it should match two single chars and "???" should match exactly 3 single chars. However, "???" matches 1, 2 and 3 chars instead. I did the same dir search on Mac and Linux and they provide the correct out. here is an example :

    • I have three files in a dir 1.sav, 12.sav and 123.sav.
    • command "dir ?.sav" returns only 1.sav as expected.
    • command "dir ??.sav" returns 1.sav and 12.sav.. this is not expected. It should only return 12.sav
    • command "dir ???.sav" returns all three 1.sav, 12.sav, 123.sav.... this is not expected. It should only return 123.sav
    • Tested this on mac/linux and all the three commands return exactly one results with matching single char for each "?" wild char.


    Take a look at the screen shot below for the experiment I ran.


    Can you provide feedback on this observation ? if this expected result, then I would like to understand how "?" is treated as wild char for dir search in Windows. If not, is this a bug ?


    Windows 10 dir search using wild char "?" is not returning expected output c1c2546e-3113-4a06-b369-a1d88d09e5d1?upload=true.png

    :)
     
    VBahirji, Jun 8, 2020
    #1

  2. dir Difficulties

    I am getting the hang of this command set.

    Maybe somebody know a work around that will list the three time stamps at one time.
    Theoretically dir /TC /TA /TW.
    dir will only show one of the three at one time.

    To me it seems that the only way to get all three on a line is to run loop with output to file, then boiling down the three outputs to one line. Clumsy but maybe the only way to get the job done?

    Thanks for any suggestions.
     
    mikeincousa, Jun 8, 2020
    #2
  3. Windows 10 DIR command output format changed

    Due to a recent change in windows 10 ... it seems several commands no longer recognize switches ... that is not an insurmountable problem ... BUT ... the output format of the DIR command changed the format of the output and as such ... all of my scripts
    that used the format used for the past 20+ years will work now

    Can someone tell me if there is a way to force Windows 10 Pro to output to use the old format?
     
    Kevin Cook - Dicecollector, Jun 8, 2020
    #3
  4. Windows 10 dir search using wild char "?" is not returning expected output

    Crucial: Whats wrong with Mail App Search Function

    thanks for your suggestion, and no, the windows search index was not the problem. it's the mail app that does not work as expected:

    expected behavior:

    1. type a keyword
    2. return search results containing that keyword

    observed behavior:

    1. type a keyword
    2. no results
    3. search online
    4. still no results and no error msg
     
    MasCaritas, Jun 8, 2020
    #4
Thema:

Windows 10 dir search using wild char "?" is not returning expected output

Loading...
  1. Windows 10 dir search using wild char "?" is not returning expected output - Similar Threads - dir search using

  2. Using The Journey to the Wild Divine on Windows 10

    in Windows 10 Gaming
    Using The Journey to the Wild Divine on Windows 10: A friend of mine is trying to run the above software on Windows 10 although an old program it installed in Windows 10 without an issue. But when the program is started it cannot detect the USB finger sensors, it appears to be IOM USB. Windows makes a sound when the USB is...
  3. Using The Journey to the Wild Divine on Windows 10

    in Windows 10 Software and Apps
    Using The Journey to the Wild Divine on Windows 10: A friend of mine is trying to run the above software on Windows 10 although an old program it installed in Windows 10 without an issue. But when the program is started it cannot detect the USB finger sensors, it appears to be IOM USB. Windows makes a sound when the USB is...
  4. Using The Journey to the Wild Divine on Windows 10

    in Windows 10 Drivers and Hardware
    Using The Journey to the Wild Divine on Windows 10: A friend of mine is trying to run the above software on Windows 10 although an old program it installed in Windows 10 without an issue. But when the program is started it cannot detect the USB finger sensors, it appears to be IOM USB. Windows makes a sound when the USB is...
  5. "dir" output file list encoding is wrong

    in Windows 10 Support
    "dir" output file list encoding is wrong: I inherited some 20,000 .jpg files which wound their way from a French language version Windows 10 to Picasa, and then downloaded several times into different folders which created several copies of the same images. (A total of 196 sub folders, but the contents and folder...
  6. Cmd.exe expected outputs

    in Windows 10 Customization
    Cmd.exe expected outputs: When i start cmd.exe, i get the following Microsoft Windows [Version 10.0.19041.630] c 2020 Microsoft Corporation. All rights reserved. Active code page: 1252 C:\Users\user> See the above "Active code page: 1252" which is coming everywhere, including if i want to run...
  7. Windows 10 Search Not Returning Results

    in Cortana
    Windows 10 Search Not Returning Results: Hello, The Windows 10 Search function has stopped working. I checked online for the basic troubleshooting and nothing resolved the problem. I will list specifics of the system below. Thanks in advance to any assistance with this search issue. Windows 10 Pro is installed on...
  8. Windows 10 DIR command output format changed

    in Windows 10 Network and Sharing
    Windows 10 DIR command output format changed: Due to a recent change in windows 10 ... it seems several commands no longer recognize switches ... that is not an insurmountable problem ... BUT ... the output format of the DIR command changed the format of the output and as such ... all of my scripts that used the format...
  9. "Mode" info returned by Windows 10 dir command

    in Windows 10 Support
    "Mode" info returned by Windows 10 dir command: Windows 10 seems to have a new set of info returned by the "dir" Powershell command. This appears under the "Mode" heading, e.g. -a---- or d----- , but nowhere have I found what these entries mean or how to interpret the individual characters. I get that they have to do with...
  10. Hidden char in file name showed by command dir

    in Windows 10 Support
    Hidden char in file name showed by command dir: Hi, In tracking a bug in app, I discovered something very odd. I have a strange file name in a directory. If I do a dir command the file name appearing is not the same as with Win Explorer! Even the copy paste from the console removes the extra char. Attached...