Problem with TWebCopy in

When I try to Upload file in newest version using TWebCopy (command Execute, protocol wpFtpUpload), the error appears:

Cannot open AVI

How can I fix it?

Delphi version?
Operating system?

Delphi 11.3 Enterprise with all Updates
Windows 11 Pro with all updates.

When I go back to, copying works ok.

I cannot reproduce this.
I retested this with the TWebCopy demo on both Windows 11 and WIndows 10 and with multiple Delphi versions and our TWebCopy demo works everywhere

Thank you for checking it.
If I am the only user having this problem, I will try to investigate it abd check in some other projects.

To Miechowicz Bogdan Andrzej,

The TWebCopy problem "Cannot open AVI" has to do with the graphical display of the message boxes. It used to be solved by including the file gdiplus.lib or gdiplus.a. You might try this and see if it works.

Thank you for your advice!

The error appears, when the project is switched from Debug to Release and is build.
I have checked the WebCopy demo project and I have the same error or another:
[BRCC32 Error] WebCopyDemo.vrc(63): file not found: webcdemo_Icon.ico

Do you have the project option on to link with runtime themes?

Yes, I do. I have made some experiments with excluding TMSUIPackDXE14 from runtime packages list, but the solution was not stable.

If a problem persists, please isolate & provide a sample source project with which we can reproduce the issue here.

How to reproduce the error:

  1. Open WebCopy demo
  2. Change BuildConfiguration from Debug to Release (and then place webcdemo_Icon.ico file in project folder) or check "Link with Runtime Packages" and input packages: TMSVCLUIPackPkgDXE14;TMSVCLUIPackPkgDEDXE14;TMSVCLUIPackPkgExDXE14
  3. Instead of downloading items from grid, just input item manually with option wpFtpUpload:

procedure TForm1.Button1Click (Sender:TObject);
i: Integer;
with WebCopy1.Items.Add do
FtpHost := ''; // or any other ftp host
FtpUserId := xxxxxx; // Ftp UserName
FtpPassword := yyyyyy; // Ftp Password
Protocol := wpFtpUpload;
Url := 'c:\test\filetoupload.txt';
TargetFileName := 'filetoupload.txt';
TargetDir := 'folder123';

1 Like

This is a behavior of the internally used TAnimate standard VCL class. It is not something in TWebCopy. It is related to how Embarcadero implemented TAnimate loading from resource.
If you run the EXE outside the IDE , you should not see the exception because in the VCL it is a gracefully added exception. The IDE always shows the exception unless you turn this off in the IDE in your DEBUG config.

Unfortunately it is not true.
If you call your application as WebCopyDemo.exe with changes described above, you will see the error

Cannot open AVI.

I tested it with 11.3 and could start the EXE outside the IDE without error

It is very easy to reproduce.
Please switch Build Configuration to Release, mark Link with Runtime Packages and specify packages:

This appears, when the protocol is changed to wpFtpUpload like in the code above.
For download process everything works ok.

That's what we did.
Moreover, it looks more like an issue with the standard VCL component TAnimate that is used here than our own component. We will check with Embarcadero.

Ok, maybe it would be possible to add something like "UseOldAnimation" property to TWebCopy to have stable version?

We'll consider this.

Error, which appeared in version causes, that I can not use the package to upload files in all my applications.
That is why I can not download new versions until it is resolved.

We added a property to select the animation between modern & classic.
This new property will be in TMS VCL UI Pack v13.0.1.0