Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Export-PWDocuments - how to prevent creation of ProjectWise folders on disk?
    • Sign In

    • State Not Answered
    • Replies 5 replies
    • Subscribers 66 subscribers
    • Views 1264 views
    • Users 0 members are here
    • powershell
    • ProjectWise
    • Export-PWDocuments

    Export-PWDocuments - how to prevent creation of ProjectWise folders on disk?

    Christian Jührendt
    Offline Christian Jührendt over 4 years ago

    Hello,

    i use Export-PWDocuments to export one document from ProjectWise to a share on the network. I use the following command with parameters:

    Export-PWDocuments -InputDocuments $validationFile -OutputFolder $exportDirectory -JustOneFolder

    The output folder path is something like:

    \\[share]\tst-Planverwaltung_Bestandsdaten$\Validierung\0b7a31c7-9c69-47e2-a4c7-9f309e8c33e7

    There should reside the file i exported but the export command creates the full tree from ProjectWise DMS like so:

    \\[share]\tst-Planverwaltung_Bestandsdaten$\Validierung\0b7a31c7-9c69-47e2-a4c7-9f309e8c33e7\Planverwaltung Bestandsdaten\3002\0980_Prüf\G-\E0--\M 1{colon}250\0002\4

    How can i prevent the creation of "Planverwaltung Bestandsdaten\3002\0980_Prüf\G-\E0--\M 1{colon}250\0002\4"?

    Regards

    Christian

    • Sign in to reply
    • Cancel
    • Dave Cole
      0 Offline Dave Cole Tue, Mar 19 2019 12:05 PM

      These were changed in 1.6.0.0 (same with Import) - you could import or export just the file without the structure.  It has been confirmed WAD for Import-PWDocuments (no explanation why the previous functionality was removed though).

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Christian Jührendt
      0 Offline Christian Jührendt Wed, Mar 20 2019 3:17 AM in reply to Dave Cole

      At the end i used the PS cmdlets Get-ChildItem and the .MoveTo method to move the files to the appropriate Directory and then i deleted the directory with Remove-Item.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dave Cole
      0 Offline Dave Cole Wed, Mar 20 2019 10:04 AM in reply to Christian Jührendt

      I did the same for the Import recently.  Slows the process down but it does get the job done.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Elahe Burns
      0 Offline Elahe Burns Mon, Mar 25 2019 4:43 AM in reply to Dave Cole

      Agreed with Dave, I ended up using switch parameter -justonefolder but I had to recreate my local path by extra coding. But you can't use this parameter when your input is document it has to be the PW path your file resides and it picks up all files in that PW path which is a bit of bummer if you don't want them all.

      Export-PWDocuments -ProjectWiseFolder $PWPath  -OutputFolder $LocalPath -JustOneFolder

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Elahe Burns
      0 Offline Elahe Burns Mon, Mar 25 2019 4:44 AM in reply to Christian Jührendt

      Did you copy your file from the file server?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • 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