Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Searching for SET files - cannot find specific set using "Get-PWDocumentsBySearch"
    • Sign In

    • State Not Answered
    • Replies 0 replies
    • Subscribers 60 subscribers
    • Views 160 views
    • Users 0 members are here

    Searching for SET files - cannot find specific set using "Get-PWDocumentsBySearch"

    Robert Biggar
    Offline Robert Biggar over 2 years ago

    Hello;

    I have been trying to use Get-PWDocumentsBySearch to search for a particular SET file.

    (Pwrshell: 5.1.19041.906

    PW:  10.0.3.329,

    DAB 1.28.0.0)

    I tried this: (shortened.)

    $contentFiles =  Get-PWDocumentsBySearch -FolderPath 'Resources\Development Resources\...\z_Active Sets' -FileName 'Milestone Forms'

    but I could not find the set file "Milestone Forms". I could find other files (.dgn, .pdf...etc.)

    My "Solution" was to grab all the files in the folder(which I could get to work) and "foreach them " until I found what I was looking for.

    $contentFiles =  Get-PWDocumentsBySearch -FolderPath 'Resources\Development Resources\...\z_Active Sets' -FileName '%'

    foreach ($cfile in $contentFiles)
       {
           if ($cfile.name -imatch "Milestone Forms")
             {
                $MF_Found = $true
              }

       }

    It works fine, but I was wondering if anyone has run into this...and if there is a way to set up the search for these kind of files...??? does it work for other people?

    maybe I am doing it wrong.

    I'm really only looking for "Existence"...and...there may be a better way to verify a file is in PW also... any thoughts?

    Thanks!

    Bob

    • Sign in to reply
    • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies