Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum search on MIME type through Powershell ?
    • Sign In

    • State Not Answered
    • Replies 2 replies
    • Subscribers 65 subscribers
    • Views 122 views
    • Users 0 members are here

    search on MIME type through Powershell ?

    NicolasT
    Offline NicolasT 2 months ago

    Hello,

    Is there a way to search on MIME type through Powershell ? We want to find all the legacy V7 DGN's in our 2 TB datasource.

    With standard PWE tools it seems not possible.

    Many Thanks,

    Nicolas Tobbackx

    • Sign in to reply
    • Cancel

    Top Replies

    • NicolasT
      Offline NicolasT Mon, Jun 26 2023 2:17 AM +1
      Thank you very much indeed Brian, We were able to identify the V7 files through SQL. Best regards, Nico Tobbackx and Jan Vantilt
    Parents
    • Brian Flaherty
      0 Offline Brian Flaherty Wed, Jun 21 2023 10:18 AM

      You could use SQL to query for all documents with the specified mimetype. Something like the following should work.

      $SQLResults_DocGUIDs = Select-PWSQL -SQLSelectStatement "SELECT o_docguid FROM dms_doc WHERE o_mimetype = '<ENTER MIME TYPE NAME HERE>'"
      
      $pwDocs = Get-PWDocumentsByGUIDs -DocumentGUIDs $SQLResults_DocGUIDS.o_docguid

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Brian Flaherty
      0 Offline Brian Flaherty Wed, Jun 21 2023 10:18 AM

      You could use SQL to query for all documents with the specified mimetype. Something like the following should work.

      $SQLResults_DocGUIDs = Select-PWSQL -SQLSelectStatement "SELECT o_docguid FROM dms_doc WHERE o_mimetype = '<ENTER MIME TYPE NAME HERE>'"
      
      $pwDocs = Get-PWDocumentsByGUIDs -DocumentGUIDs $SQLResults_DocGUIDS.o_docguid

      • 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