GetFilesCount
PowerScript function
Description
Gets the number of files contained in the archive.
Applies to
ExtractorObject objects
Syntax
|
1 |
objectname.GetFilesCount ( string source ) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the ExtractorObject object. |
|
source |
The full path of the compressed package. Packages compressed by the LINUX commands are |
Return value
Long. If any argument’s value is null, the method returns
null.
Note: the folder will also be calculated as a file. For example, if
a folder contains 3 files, the total number of files is 4 when
decompressing.
The return values are:
-
>= 0 — the number of files in the compressed package.
-
-1 — A general error occurred.
-
-3 — The operation is not supported for the source file
format. -
-5 — A task thread is currently running.
-
-6 — You must enter a password.
-
-7 — The password is incorrect.
-
-9 — Failed to read the compressed file.
-
-10 — Unrecognized format or the encrypted file name option is
used for the compressed document. -
-12 — The compressed file does not exist.
Examples
|
1 2 3 4 5 6 7 8 9 10 |
ExtractorObject lnv_extractor string ls_source, ls_password long ll_filescount lnv_extractor = create ExtractorObject ls_source = "E: est.rar" //Suppose the package requires a password lnv_extractor.Password = ls_password ll_filescount = lnv_extractor.GetFilesCount (ls_source) |
See also