1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Directory wildcards not working with ffind

Discussion in 'Support' started by hlhelman, Dec 28, 2010.

  1. hlhelman

    Joined:
    Mar 20, 2009
    Messages:
    32
    Likes Received:
    0
    I have tried using directory wildcards and the seemed to work ok with dir or pdir but the same argument with ffind does not work.
    example:

    C:\Howard\working>pdir/(f) "c:\Program Files\JP*\"*\*.exe
    ide.exe
    ShrAlias.exe
    tcc.exe
    tcmd.exe
    updater.exe

    C:\Howard\working>ffind "c:\Program Files\JP*\"*\*.exe

    0 files

    This also fails with just the single wildcard \*\
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    FFIND is one of the few commands that does not implement directory wildcards because it's not meaningful. (Your example does the same thing as DIR or PDIR, only not as well.)
     
  3. hlhelman

    Joined:
    Mar 20, 2009
    Messages:
    32
    Likes Received:
    0
    The documentation for directory wildcards is very limited. There is more information in the what's new area than in the File Selection/wildcards and regular expression section of help. This directory wildcards would be useful if /t option was used with ffind.

    After thinking about it using /s with directory wildcards seems to be confusing and I think I got TCC to crash in some cases before I realized the conflict.

    Additional documentation of directory wildcards would be useful.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    Windows goes to great lengths to prevent directory wildcards from working. It took a couple thousand lines of code and additional custom code for every file-handling command or function to support it, so (like CLIP:) it only gets added where it's most sensible / useful.

    FFIND is particularly problematic, but I'll see if something can be done to support it in the case of text searching.

    As the help says, combining /S with directory wildcards is a sure path to destruction. I doubt you'll crash in TCC code, but you can certainly easily get into near-infinite loops and blow your stack, or crash inside Windows APIs that don't expect to be called recursively.
     

Share This Page