Difference between revisions of "Function.Automation.ZIPPro.Delete"

From GAB Help
Jump to: navigation, search
m
Line 1: Line 1:
Delete method deletes one or more files from an existing archive, without reprocessing the compressed data.
+
==Delete(FileNames)==
 +
Deletes one or more files from an existing archive.
  
==Syntax==
+
===Arguments===
Function.Automation.ZIPPro.Delete(filenames [String])
+
====FileNames as String====
 +
File paths may be set to one or more filenames or directory names. Files may be specified with or without a path, and with or without wildcards. If a path is specified, files in the indicated directory will be affected; A pipe character ("|") should be used to separate multiple file or directory names. Alternatively, the method may be invoked repeatedly.
  
==Arguments==
+
===Examples===
===filenames===
+
<code>Function.Automation.ZIPPro.Delete("FileNames")</code>
String
 
  
* Multiple Filenames should be delimited by "|"
+
<code>Function.Automation.ZIPPro.SetProperty("ARCHIVEFILE",0,"c:\path")
 
 
==Examples==
 
<nowiki>function.automation.ZIPPro.RESET()
 
'Provide the path of the existing .Zip file
 
Function.Automation.ZIPPro.SetProperty("ARCHIVEFILE",1,V.Local.sRet)
 
'Scan the archive specified by archivefile property
 
 
Function.Automation.ZIPPro.Scan()
 
Function.Automation.ZIPPro.Scan()
'Provide the name of the file to be deleted
+
Function.Automation.ZIPPro.INCLUDEFILES("c:\path\textFile.txt")
Function.Automation.ZIPPro.Delete("TEST_Update.docx")</nowiki>
+
Function.Automation.ZIPPro.Delete("textFile.txt")</code>
  
==Remarks==
 
* Invoking Delete will only remove files from ArchiveFile; it will not delete the files from the disk.
 
* Invoking Delete repeatedly on large archives is not recommended.
 
* When deleting multiple files, the control will operate most efficiently if all filenames are passed to Delete in a single invocation of the method.
 
* The list of filenames should be specified exactly as when calling Extract.
 
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Function.Automation]]
 
[[Category:Function.Automation.ZIPPro]]
 
[[Category:Function.Automation.ZIPPro]]
[[Category:NeedsExample]]
+
 
[[Category:NeedsEdit]]
+
__FORCETOC__
[[Category:Function.Automation]]
 

Revision as of 13:35, 20 May 2020

Delete(FileNames)

Deletes one or more files from an existing archive.

Arguments

FileNames as String

File paths may be set to one or more filenames or directory names. Files may be specified with or without a path, and with or without wildcards. If a path is specified, files in the indicated directory will be affected; A pipe character ("|") should be used to separate multiple file or directory names. Alternatively, the method may be invoked repeatedly.

Examples

Function.Automation.ZIPPro.Delete("FileNames")

Function.Automation.ZIPPro.SetProperty("ARCHIVEFILE",0,"c:\path") Function.Automation.ZIPPro.Scan() Function.Automation.ZIPPro.INCLUDEFILES("c:\path\textFile.txt") Function.Automation.ZIPPro.Delete("textFile.txt")