× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jerry
This is what I have to zip files from down in the ifs
Its part of an RPGLE program
The QSH command does a change directory to where the files reside - then the jar command (cfM are parameters) does the zip and creates the zip file in the Toifsfile
//-----------------------------------------------------------------------
dcl-proc CrtZipFile;

Fromifsfile = %trim(Path4IndBOL0slash);

Invdate = %char(%date():*iso0);
Presenttime = %char(%time():*hms0);

FileName = Invdate + '_' +
Presenttime + '_BOL.zip';

ToifsFile = Path4zip + '/' + %trim(Filename);

CmdString = 'QSH CMD(' + Quote + 'cd ' +
%trim(Fromifsfile) + ' && ' +
'jar cfM ' +
%trim(Toifsfile) + ' *.pdf' + Quote + ')';
ErrorFlag = system(%trim(cmdString));

end-proc;

Alan Shore
Solutions Architect
IT Supply Chain Execution

[cid:image001.png@01D71665.21C36340]

60 Orville Drive
Bohemia, NY 11716
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
E-mail : ASHORE@xxxxxxxxxxxxxxxxxxxx

'If you're going through hell, keep going.'
Winston Churchill

From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Nadir Amra
Sent: Thursday, March 11, 2021 10:12 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: CPYTOARCF

Unfortunately, you cannot remove folders from path.




"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx<mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx>> wrote on 03/10/2021
06:56:00 PM:

From: Jerry Draper <midrangel@xxxxxxxxxxxxx<mailto:midrangel@xxxxxxxxxxxxx>>
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx<mailto:midrange-l@xxxxxxxxxxxxxxxxxx>>
Date: 03/10/2021 06:56 PM
Subject: [EXTERNAL] CPYTOARCF
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx<mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx>>

Testing this routine.

My target .txt file is four levels down off the root.

The result .zip has all the folder levels when it is unzipped.

How can I make the zip so it is just the zip and ignores the folders?

I'm doing a chdir to /x/x/x/x before doing the cpytoarc.

Jerry


--
Jerry Draper, Trilobyte Software Systems, since 1976
IBMi, Network, and Connectivity Specialists, LAN/WAN/VPN
Representing WinTronix, Synapse, HiT, and others .....
(415) 457-3431 opt-1 . www.trilosoft.com<http://www.trilosoft.com>

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?<https://urldefense.proofpoint.com/v2/url?>

u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=c-VgMx5FdsVdn8l_LHRf5w-
MFI41pM0SJhoVrlvUTP4&s=ab0ih8rbYZHbPzVs7Z3CJpXFV_7MRmPuhN4ADPO6lNM&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://urldefense.proofpoint.com/v2/url?<https://urldefense.proofpoint.com/v2/url?>
u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=c-VgMx5FdsVdn8l_LHRf5w-
MFI41pM0SJhoVrlvUTP4&s=Kzxl6EmBXVlLaJeRhwAuT84utHXRkGpCUPkEa5C9L4o&e= .

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?<https://urldefense.proofpoint.com/v2/url?>
u=https-3A__amazon.midrange.com&d=DwICAg&c=jf_iaSHvJObTbx-
siA1ZOg&r=1i-jGlz0-JTK1aLHcsU-ew&m=c-VgMx5FdsVdn8l_LHRf5w-
MFI41pM0SJhoVrlvUTP4&s=Gd1oMOZTCcgI6thaOeoamJ6WFSpQw59mR87KvdppNd8&e=



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l<https://lists.midrange.com/mailman/listinfo/midrange-l>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l<https://archive.midrange.com/midrange-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com<https://amazon.midrange.com>



The Nature’s Bounty Co. is now The Bountiful Company! Our email address will be changing from @nbty.com to @bountifulcompany.com. Please update your email address book so that important communications are not interrupted.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.