Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Get-PWFolder and Get-PWRichProjects
    • Sign In

    • State Verified Answer
    • Replies 10 replies
    • Subscribers 67 subscribers
    • Views 5560 views
    • Users 0 members are here
    • pwps_dab

    Get-PWFolder and Get-PWRichProjects

    Patrick Tran
    Offline Patrick Tran over 5 years ago

    Is there any cmdlet that will return only the contents of a specific folder (and not the tree below it)? 

    Our directory structure is set up in a way that I can easily pipeline and filter for the specific folders I want, but the two aforementioned cmdlets seem to parse through every folder before anything is returned, which takes a very long time.

    Documents\Clients\Projects\Project Folders and Files\

    If the above is my folder structure, what's the best way to just return a collection of Clients?

    • Sign in to reply
    • Cancel

    Top Replies

    • Brian Flaherty
      Offline Brian Flaherty Thu, Mar 29 2018 7:53 AM in reply to Kevin van Haaren +2 verified
      I have had a couple of requests for this functionality. I have create cmdlet 'Get-PWFoldersImmediateChildren' to return only the immediate child folders of a specified folder. This should be available…
    Parents
    • Mark Kovach-WGI
      0 Offline Mark Kovach-WGI Wed, Nov 28 2018 1:00 PM

      Anyone have an ideas on how to get-pwfolders to find folders (projects really) a little deeper in the path? I want to start at level 2 and search for (find) the projects (level 3) in these level 2 folders. We have the projects broken out into numbered groups like below. It would be really cool to be able to search though the datasource without it taking hours and list my projects (saving to an Excel file). I have the rest of the script working like I want it to. Searching for the projects is the only thing hanging me up.

      0000

      0100

      0200

      0300

      etc.

      Level of folders to search

      --------- 1 -------\---- 2 ---\------ 3 -------

      Internal Projects \ 0400 \  >here<

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert McMillan
      0 Offline Robert McMillan Wed, Nov 28 2018 4:25 PM in reply to Mark Kovach-WGI

      Get-PWFoldersImmediateChildren on the Internal Projects folder to get each numbered group then Get-PWFoldersImmediateChildren again on each of them to return the projects.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Mark Kovach-WGI
      0 Offline Mark Kovach-WGI Fri, Dec 14 2018 10:14 AM in reply to Robert McMillan

      Thanks Robert. That's what I ended up doing.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Mark Kovach-WGI
      0 Offline Mark Kovach-WGI Fri, Dec 14 2018 10:14 AM in reply to Robert McMillan

      Thanks Robert. That's what I ended up doing.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    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