File-Compression with C/Side

rkaufmann
Member Posts: 71
Hi,
I know this has beed discussed already, but what I need is a bit more special I think.
So here we go:
I need a OCX or Automation for C/Side to create compressed self-extracting archives for given files and/or whole directories.
Commandline-Tools will not help, because the files to compress may vary a lot in size, so the time the compression takes will vary also. Using Commaldline Tools and SLEEP is therefor not really helpfull.
C/Side must have control over the compression process and must know when the compression is finished, because the Code Processing in C/Side has to wait until the compression is finished.
I would also be helpfull, if C/Side would know, if the compression was successfull at all.
Does anybody know a Compression Tool, which can be used to achieve that?
Thanks,
Rolf
I know this has beed discussed already, but what I need is a bit more special I think.
So here we go:
I need a OCX or Automation for C/Side to create compressed self-extracting archives for given files and/or whole directories.
Commandline-Tools will not help, because the files to compress may vary a lot in size, so the time the compression takes will vary also. Using Commaldline Tools and SLEEP is therefor not really helpfull.
C/Side must have control over the compression process and must know when the compression is finished, because the Code Processing in C/Side has to wait until the compression is finished.
I would also be helpfull, if C/Side would know, if the compression was successfull at all.
Does anybody know a Compression Tool, which can be used to achieve that?
Thanks,
Rolf
0
Answers
-
You can use SHELL with a returncode. This way, Navision will wait until the execution has finished, and you can get the result of your command.[ReturnCode]:= SHELL(Name [, Param, ...])
ReturnCode
Data type: integer
ReturnCode is used for two different purposes:
First, if ReturnCode is used, the external program will be run modally, while it will be run non-modally if ReturnCode is not used. For instance, if you want to go to the operating system and get a directory listing and then bring that information back into the system, include ReturnCode. Omit ReturnCode if you want to run the external program non-modally. For instance, if all you want to do is pass information (such as a name and address) to a standardized letter that is set up in a word processor, you would omit the ReturnCode.
Second, ReturnCode can contain the return value of the external program. Since external programs can return different codes to reflect whether errors occurred during the execution of the program, the values stored in ReturnCode depend on the external program.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
And you can use 7-zip : http://www.7-zip.org.
It has a command-line interface, it can create exe-files and with the SHELL-command or even better
http://www.mibuso.com/forum/viewtopic.php?t=12417, you can control when it finishes. I already use the combination and it works fine.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Many thanks.
Learned something new today.
One thing I forgot to mention in my first post:
The code needs to work in NAS.
So I think I will try kriki's solution, because NAS can not answer the confirmation-request of the SHELL-Command, right?0 -
rkaufmann wrote:Many thanks.
Learned something new today.
One thing I forgot to mention in my first post:
The code needs to work in NAS.
So I think I will try kriki's solution, because NAS can not answer the confirmation-request of the SHELL-Command, right?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks again for your quick reply.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