Add count condition for a specific extension

Welcome Forums General PowerShell Q&A Add count condition for a specific extension

Viewing 2 reply threads
  • Author
    Posts
    • #277101
      Participant
      Topics: 3
      Replies: 1
      Points: 37
      Rank: Member

      Hello

      I have a script which wait for a specific extension (*.end) in a folder before starting the copy / move function. I’d like a count condition, only start the copy / move only if 2 *.end file are present.

      I tried to add .Count -lt 2, in the test-path but it didn’t work

      Thank you for your help

       

    • #277122
      Participant
      Topics: 4
      Replies: 425
      Points: 748
      Helping Hand
      Rank: Major Contributor

       

      • This reply was modified 1 month, 2 weeks ago by Matt Bloomfield. Reason: Corrected Typo
    • #277146
      Participant
      Topics: 3
      Replies: 1
      Points: 37
      Rank: Member

      Great Thank you very much

Viewing 2 reply threads
  • You must be logged in to reply to this topic.