Skip to Content

Zip File in BODS

Hallo Experts,

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

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Feb 27, 2017 at 10:35 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 27, 2017 at 08:12 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 28, 2017 at 04:53 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 17, 2017 at 07:22 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded