web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

UnZip or Extract compressed files from Ax using X++

(0) ShareShare
ReportReport
Posted on by 312

Hi All,

Is it possible to unzip or extract the compressed from AX using x++ code ?

Please help with any references.. I don't want to use power shell scripts for unzipping.

Thanks

Hariharan

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Sure, you can use appropriate .NET libraries in X++ via .NET Interop. Look at How to: Compress and Extract Files for examples in .NET, then you just have to convert it to X++ syntax.

  • Hariharan Marudan Profile Picture
    312 on at

    Is there any way, can i use System.IO.Compression.GZipStream or DeflateStream in AX (X++) to directly unzip the compressed files ?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Sure, .NET Interop allows you to use .NET objects in X++. That's the whole point of my answer.

  • Hariharan Marudan Profile Picture
    312 on at

    Hi Martin,

    Thanks for your reply.

    I see if we use (.net framework 2.0) System.IO.Compression assembly in 2009, it support only GZipStream, DeflateStream. This version of framework supported assembly does not support .zip decompression. We use .net framework 2.0, 3.5 in our prod. environment.

    I see ZipArchive, ZipFile is supported in framework 4.0 System.io.compression assemblies.

    I may be wrong in my findings, please correct me, also guide me if you have any samples x++ code using this assembly or any other options.

    Thanks

    Hariharan

  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Sorry, you're right that ZipArchive and ZipFile classes don't exist in .NET Framework 3.5, they we've been added in 4.5. But it doesn't mean that .NET application didn't use zip archives for all years before - you can utilize DotNetZip, for example.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans