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

From GAB Help
Jump to: navigation, search
m
Line 1: Line 1:
==Syntax==
+
==SetProperty(Name, Value)==
Function.Automation.ZIPPro.SetProperty(property, file index [Long], value [String])
+
Sets a property value.  The available properties can be found http://cdn.nsoftware.com/help/IZF/cs/Zip.htm
  
==Arguments==
+
===Arguments===
===property===
+
====Name as String====
 +
The property name
 +
====Value as Any====
 +
The property value [as object]
  
The properties are as follows (* marked properties require a file index):
+
===Examples===
* ArchiveFile (String)
+
<code>Function.Automation.ZIPPro.SetProperty("Name",V.Local.Property)</code>
* CompressionLevel (Long)
 
* EncrytpionAlgorithm (Long)
 
* ExcludedFiles (String)
 
* ExtractToPath (String)
 
* FileAttributes * (long)
 
* FileComment * (long)
 
* FileCompressedName * (String)
 
* IgnoreErrors (Boolean)
 
* OverwriteFiles (Boolean)
 
* Password (string)
 
* RecurseDirectories (Boolean)
 
* ZipComment (string)
 
  
===file index===
+
====Indexed properties====
Long
 
  
Index of the file in the collection
+
The properties require a file index:
===value===
+
* FileAttributes
String
+
* FileComment 
 +
* FileCompressedName
 +
 
 +
<code>
 +
Function.Automation.ZIPPro.SetProperty("FILECOMPRESSEDNAME", 1,"file-at-index-1-renamed")
 +
 
 +
Function.Automation.ZIPPro.SetProperty("FILECOMPRESSEDNAME", 2,"file-at-index-2-renamed")
 +
</code>
  
==Examples==
 
<nowiki>Function.Automation.ZIPPro.INCLUDEFILES("C:\Users\abc\Documents\CreateZip\")
 
'Give the path and name of the ZIP file to be created
 
Function.Automation.ZIPPro.SetProperty("ARCHIVEFILE",0,C:\Users\abc\Documents\CreateZip.Zip)
 
Function.Automation.ZIPPro.SetProperty("RECURSEDIRECTORIES",1,"TRUE")
 
Function.Automation.ZIPPro.SetProperty("FILEATTRIBUTES",0,34)
 
'Comment the file
 
Function.Automation.ZIPPro.SetProperty("FILECOMMENT",0,"Extracted the excluded files also")
 
'Encryption type.Default is 0
 
Function.Automation.ZIPPro.SetProperty("ENCRYPTIONALGORITHM",1,0)
 
'Level of Compression,between 0-6
 
Function.Automation.ZIPPro.SetProperty("COMPRESSIONLEVEL",0,4)
 
'Compressed name for the file
 
Function.Automation.ZIPPro.SetProperty("FILECOMPRESSEDNAME","TEST_ZIPPRO_Compressed.docx","TEST_ZIPPRO.docx")
 
'Ignore errors default is false
 
Function.Automation.ZIPPro.SetProperty("IGNOREERRORS",0,"false")
 
'Comment for the ZIP file
 
Function.Automation.ZIPPro.SetProperty("ZIPCOMMENT",0,"Compressing all the files")
 
'Exisitng file will be overwritten when decompressing if the property is set to true.
 
Function.Automation.ZIPPro.SetProperty("OVERWRITEFILES",0,"false")</nowiki>
 
  
==Remarks==
 
* If the property to be read does not require a file index, a blank or 0 value may be passed in the parameter. Otherwise, the file index should be between 0 and FileCount - 1.
 
  
 
[[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:49, 20 May 2020

SetProperty(Name, Value)

Sets a property value. The available properties can be found http://cdn.nsoftware.com/help/IZF/cs/Zip.htm

Arguments

Name as String

The property name

Value as Any

The property value [as object]

Examples

Function.Automation.ZIPPro.SetProperty("Name",V.Local.Property)

Indexed properties

The properties require a file index:

  • FileAttributes
  • FileComment
  • FileCompressedName

Function.Automation.ZIPPro.SetProperty("FILECOMPRESSEDNAME", 1,"file-at-index-1-renamed")

Function.Automation.ZIPPro.SetProperty("FILECOMPRESSEDNAME", 2,"file-at-index-2-renamed")