Skip to Content
0

Zip File in BODS

Feb 25, 2017 at 06:43 PM

495

avatar image

Hallo Experts,

My requirement is to Zip a file in BODS ,Any Idea

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Arun Sasi Feb 27, 2017 at 10:35 AM
1

You can refer to below link

http://stackoverflow.com/questions/20485419/batch-file-script-to-zip-files

Use the Exec() function to execute the script placed on folder

Regards

Arun Sasi

Share
10 |10000 characters needed characters left characters exceeded
Ravi kiran Pagidi Feb 27, 2017 at 08:12 AM
0

May be you need to implement a windows script or vb script which can ZIP a file and execute the script in BODS.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 28, 2017 at 04:53 AM
0

Make use of .zip exe using EXEC function..e.g EXEC('Location of ZIP EXE including ZIP.EXE','ZIP COMMAND');

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 17, 2017 at 07:22 PM
0

Hi Guru's,

I am Zipping a file - this works.

exec('7z.exe', 'a "[$$Zip_Dir]"[$GV_Nom0].7z \"[$$Dir]"[$GV_Nom0][$$FichierExt] ' ,8);

What I need it to do is to stop the process if it is not able to complete the command for some reason. I have tried to make this =$Cmd_Return, but this is what I get:

3396 4324 PRINTFN 2017-11-17 13:52:18 Cmd_Return " 1: 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04 Open archive:
3396 4324 PRINTFN 2017-11-17 13:52:18 \\da\ZIP\Z.7z -- Path = \\da\ZIP\Z.7z Type = 7z Physical Size = 32Headers Size = 0
3396 4324 PRINTFN 2017-11-17 13:52:18 Method = LZMA2:12 Solid = - Blocks = 0 Scanning the drive: 0 file, 0 bytes (1 KiB) Updating archive:
3396 4324 PRINTFN 2017-11-17 13:52:18 \\da\ZIP\Z.7z Items to compress: 0 Files read from disk: 0 Archive size: 505 bytes (1 KiB) Everything
3396 4324 PRINTFN 2017-11-17 13:52:18 is Ok"

Not sure how to tell it to take the flag 1 error code and tell it to

raise_exception_ext('Error in file or path', 1); which then sends it to the catch to exit with an error, we don't want the process to continue and complete as successful. Can someone help?

Share
10 |10000 characters needed characters left characters exceeded