none
How to use wildcard operator in place of DateTimestamp RRS feed

  • Question

  • I am trying to look for existence of a file and using below code:

    When I mention full folder name it is working , else no output , please help:

     

    $Source_1 = "C\Inputs\556453_201810081700"

    $ErrorFilecheck = $Source_1 |Get-ChildItem | Select-Object -Property Name | Where-Object {$_.Name -like "error*"}

    $ErrorFilecheck 

    If use like below , no output:

     

    $Source_1 = "C\Inputs\556453_*"

    $ErrorFilecheck = $Source_1 |Get-ChildItem | Select-Object -Property Name | Where-Object {$_.Name -like "error*"}

    $ErrorFilecheck 



    Best Regards,SQLBoy


    • Edited by Kumar GK Tuesday, December 4, 2018 8:18 AM
    Tuesday, December 4, 2018 7:31 AM

Answers