extract compressed file

Belias
Member Posts: 2,998
here's what i have to do:
1. i receive a compressed xml file...which is simply a file witout extension
2. i rename this file through navision, adding .zip extention (i can't do file.open and then file.rename as i can't open an extensionless file)
3. i extract the file
4. i rename the extracted file, adding .xml at the end (also the extracted file has not got extention)
how can i achieve this?i tried to search the net, but i only found how to compress and not vice versa...thanks in advance
1. i receive a compressed xml file...which is simply a file witout extension
2. i rename this file through navision, adding .zip extention (i can't do file.open and then file.rename as i can't open an extensionless file)
3. i extract the file
4. i rename the extracted file, adding .xml at the end (also the extracted file has not got extention)
how can i achieve this?i tried to search the net, but i only found how to compress and not vice versa...thanks in advance
0
Comments
-
Well certainly NAV doesn't have a way to extract files. So you'll have to find some sort of ZIP program that can handle automation.
Try searching MSDN for some of the Windows automations that you might be able to use within the NAV client. You might even be able to get access to the basic zip functionality in the OS.0 -
Hi Belias,
I once used the following component to zip and unzip files:
http://www.xstandard.com/en/documentation/xzip/
It works this this:CREATE(oZip); oZip.UnPack(YourZipFile, PathToUnzip);
Reijer Molenaar
Object Manager0 -
i'll try your solution reijer...i've to connect to my "Trash" E-mail account and than i'll try it.
BTW, i also found this
http://dynamicsuser.net/blogs/dynamicslife/archive/2007/10/09/dl-zip-manipulations-using-windows-features.aspx
but i couldn't understand how it can be used to extract files...0 -
Hi BeliasZIPFolder.CopyHere(Filename); // just copying
nice huh?
0 -
@reijermolenaar: tried to do it, but it does not work
@DaveT: i can't get it work, maybe there's something wrong in my zip file?
here's my codeTXTGnuCashFolder := 'C:\blahblah\150_ANI'; CREATE(AUTShell); AUTZipFolder := AUTShell.NameSpace(TXTGnuCashFolder + '.zip'); TXTFileName := 'C:\blahblah'; AUTZipFolder.CopyHere(TXTFileName + '\test.xml'); CLEAR(AUTShell);
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions