Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Delete file present inside a zip file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Delete file present inside a zip file
 Login/Join
 
Silver Member
posted
Hi All,
Greetings!

For a file outside zip, i used !DEL FILEPATH\FILENAME and it worked fine.
But now my problem is - how to delete a file present inside a zip file ?


Any help appreciated!


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Expert
posted Hide Post
Easy as 1, 2, 3...

1) Open the zip file,
2) Select file(s) to be deleted, and
3) Press the "delete" key (you may need to press the Confirm button)

I hope this helps




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I suggest checking out the command line options for the achive program you are using.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Thanx for reply guys.

@Doug:- I wana delete it thru a fex(that is part of a batch job) and asking for some way(command) to delete it.


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Master
posted Hide Post
I am not sure what WebFocus uses to Zip, but I have the WinZip command line addon installed on our servers to Zip (it supports Password Protection and Encryption).

To delete files from zip files with this tool you'd use the -d option.

From the Help File:
quote:

Unless -d (delete files) is specified, WZZIP assumes "*.*" (i.e., all files) if you don't specify either @listfile or files. The -d action requires you to specify files explicitly.

Copyright © 2004 WinZip Computing, Inc. All rights reserved.


I think the code would looke like this:
wzzip -dfile_to_delete.txt zip_file.zip

-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Expert
posted Hide Post
Sorry Pink, for missing that part of your original request...
"@Doug:- I wana delete it thru a fex"
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Silver Member
posted Hide Post
Hi

I tried this but not successful:-

  
-SET &ZPATH = 'E:\delzipfiletest\ztest1.zip';
-SET &ZFILE = 'test3.txt';

WZZIP -d &ZFILE &ZPATH


it says unrecognized command..

Any other ideas ??


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Virtuoso
posted Hide Post
Of course it is an unrecognized command for FOCUS. You would have to precede it with ! or DOS.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
sorry GamP, missed that part in above code.. regardless its still unrecognized command


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Master
posted Hide Post
- Do you have WinZip and the Command-Line Add-on installed on your server?

- Do you have a copy of wzzip installed (copied) to C:\Windows\System32\ (or do you have the path included before the exe name)?


FWIW, I have mine as a batch file that does the zip/encrypt/copy step. I can't recall the details, but I needed to do it this way to get around some limitation (output dir in a UNC maybe, not sure).

Here's Mine (verrrrry trimmed):

-SET &TOPATH   = '\\GATEWAY\PUBLIC\';
-SET &FROMPATH = 'C:\IBI\APPS\HELDFILES\';
-SET &NAMEBASE = THEDATA | '_' | &BEGDATE | '.' | &ENDDATE;
-SET &FILENAME = &NAMEBASE | '.TXT';
-SET &ZIPNAME  = &NAMEBASE | '.ZIP';

-SET &OUTFILE = &FROMPATH | &ZIPNAME;
-SET &INFILE  = &FROMPATH | &FILENAME;
-SET &FINFILE = &TOPATH | &ZIPNAME;

.
.
.

TABLE FILE BT_MATCH_STEP_2
PRINT
	OUT_LINE
ON TABLE HOLD AS DATAFINAL FORMAT ALPHA
END


-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-* STEP ZIP/ENCRYPT/PASSWORD
-*
-* Z I P / E N C R Y P T   F I L E
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

DOS "\\server\c$\Documents and Settings\someid\My Documents\scripts\ZIPCOPYENCRYPT.BAT" &OUTFILE &INFILE


-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-* STEP COPY OUT
-*
-* C O P Y   F I L E   T O   P U B L I C   F T P   S H A R E
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

DOS COPY &OUTFILE &FINFILE



Here's the batch file that does the zip:
"c:\program files\winzip\wzzip" -sSuPeRSeCrEtPaSsWoRd -ycAES256 %1 %2 "C:\Documents and Settings\someid\My Documents\Support_Files\project\*"

If Not ErrorLevel 1 Goto Exit
Echo *** ERROR COPYING FILE ***
:Exit


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Virtuoso
posted Hide Post
Still, you do have to have WZZIP.exe available. If you don't have that executable, or if you do but try to start it without specifying the path to the exe you'll get the unrecognized command.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
Thanks ABT and GamP for the insight. For the time being this has been taken care by Java in my application. But I would like to work on this as soon as I get a bit free Smiler


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
<JG>
posted
WebFOCUS has it's own zip functionality (PK zip)

for example to zip files i.e. the standard log files from the edatemp working directory into c:\temp\xx.zip

! zip c:\temp\xx stderr.log stdout.log sysh.tmp

To delete a specific file i.e. sysh.tmp from zip file xx.zip

! ZIP -d c:\temp\xx sysh.tmp

to display standard help for the zip utility

! zip -h

to display extended help for the zip utility

! zip -h2
 
Report This Post
Silver Member
posted Hide Post
Hi JG,
I'll try that for sure and revert early next week Smiler


Thanks and Regards,

WF 7611
XFOCUS/FOCUS DB
Win XP
EXL2K/HTML
 
Posts: 37 | Location: India | Registered: September 25, 2008Report This Post
Master
posted Hide Post
JG,
Thanks for the tip. I used PKZIP back in the day (Windows 3.1) and its nice to know that's what's under the covers.

I assume that's only on Windows, just curious if our *nix brethren have gunzip/gzip under their covers.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Delete file present inside a zip file

Copyright © 1996-2020 Information Builders