RegEx Windows Search

Discussion in 'Scripting' started by Duckz, Jan 14, 2018.

  1. Duckz

    Duckz MDL Junior Member

    Jan 6, 2010
    71
    12
    0
    Hi all,

    I'm trying to perform a search of a directory and all of it's sub directories, for any files that contain a common string of characters. I've performed this search in the past, but I cannot remember how I did it.

    I've been playing a bit in PowerShell, but I have no real knowledge of it, so I'm not too sure if I am even close.

    Here is what I've got at the moment;
    Code:
    Get-ChildItem -Path "E:\TV Shows" -Recurse | Where-Object { $_.name -match '\S[0-9]+E[0-9]+-E[0-9]+\' }
    Basically, I want a list of files that contain in it's filename SxxExx-Exx (where xx is replaced by two numbers).

    Am I on the right track?

    Any help would be gratefully appreciated.

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Duckz

    Duckz MDL Junior Member

    Jan 6, 2010
    71
    12
    0
    Solved.

    Found that it was a piece of software I used in the past called UltraSearch.

    Performed the exact search I was wanting to do with the above RegEx.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,354
    2,026
    210
    As will do FileLocator Lite
     
  4. GodHand

    GodHand MDL Addicted

    Jul 15, 2016
    534
    926
    30
    Get-ChildItem -Path "E:\TV Shows" -Recurse | ? { $_.Name -match "^S[0-9]+E[0-9]+-E[0-9]+$" }
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...