Extracting embedded files - Forum

Forum Navigation
You need to log in to create posts and topics.

Extracting embedded files

Hi,

I have a large number of embedded files in my software. One way to extract them is extracting one by one. This way needs hundreds lines of code.

Is it possible to extract all embedded files at once?

Hello,

>Is it possible to extract all embedded files at once?

Currently not. May I ask about the reason for this wish?

You may use an installer to copy your app and all support files to your target system.

Regards

Hans-Peter

Another hint: You may use the recently extended "FileList" command to get a list of the embedded files.

Then you need only a loop to extract your files with a few lines of code.

Regards

Hans-Peter

luishp and Vadim have reacted to this post.
luishpVadim

Hi,

Would you please explain more?

How can I do this by "FileList" action?

I would be grateful if you could send me an example

An example:

[EmbFileListMask] is here *.*

FileList "[Embedded][EmbFileListMask]" "" "[EmbeddedFileList]"

If "[EmbeddedFileList]" "<>" ""
  StrParse "[EmbeddedFileList]" "[#13]" "[EmFile]" "[EmCount]"
  Loop "1" "[EmCount]" "[emcounter]"
    ExtractFile "[Embedded][EmFile[emcounter]]" "C:\ExtractFolder\"
  Endloop
Endif

 

luishp and saeid have reacted to this post.
luishpsaeid

@hpw

Thanks for your help.

What's wrong with the following code:

FileList "[Embedded]*.*" "" "[EmbeddedFileList]"

when I run it, the following error is appeared:

Unknown error #123

Hello,.

Do you use VNW 21.06.24 or newer?

Do you have embedded files defined in the embed-dialog?

Regards

Hans-Peter

 

Just tested with Neobook 5.8.7

Then I get the same error. So I assume that you are using a older VNW. Right?

H.P.

saeid has reacted to this post.
saeid

By the way: With the fresh released VNW 21.8.10 you have a new option: UnZipToFiles

You put all your file in a zip and embed the zip in your app.

UnZipToFiles "[Embedded]YourData.zip" "YourExtractFolder" "*.*" "" "[ZipPassword]" "[ZipResult]"

 

luishp, Vadim and saeid have reacted to this post.
luishpVadimsaeid

@hpw

Hello,

Thanks for your explanation and time.

I use Neobook 5.8.7.

Do you know any solution which works in Neobook 5.8.7 ?

Hello,

Put your filelist in a textfile or a Multiline-textentry objekt.

(You can grab the files from your pub-source with a texteditor. Look for EmbeddedFiles= .......)

Then use a loop similar to the code in my post above.

Regards

Hans-Peter

 

 

saeid has reacted to this post.
saeid