login about faq

Hi to all, I'm using FTP2 Ocx 32bit Class

I'm trying to get a remote file size to use in my percent bar. loFtp.Connect() is OK loFtp.ChangeRemoteDir("mydir") is OK loftp.GetCurrentRemoteDir() returns "mydir" that is OK loftp.GetFileName(1) returns "myfile" that is OK

loftp.GetSize(1) returns -1 (that is KO !!! Why!) or loftp.GetSizeByName("myfile") returns -1 (that is KO !!! Why!)

where am I wrong? Thanks Daniele

asked Jan 09 '14 at 15:38

Danielito's gravatar image

Danielito
1111


First, make sure that you are using the latest version of the library (9.4.1).

Next, after calling .GetSize(1), record the return value of the LastErrorText property, and then post it here in <pre></pre> tags.

We can review the log and see if there are any clues as to why you are getting the result that you are.

link

answered Jan 09 '14 at 21:04

jpbro's gravatar image

jpbro ♦
1.1k2618

Also - are the files large (>2 GB)? If so, maybe the size won't fit in a 32-bit integer. What results do you get if you call .GetSizeStr(1) instead?

link

answered Jan 09 '14 at 21:06

jpbro's gravatar image

jpbro ♦
1.1k2618

Hi Jpbro, It's very strange. This morning I tried again to run the commands to check the version and LastErrorText property and everything works. I do not know why it doesn't work last night. However, the version is 9.4.1.42. Thanks for everything. Daniele

link

answered Jan 10 '14 at 02:56

Danielito's gravatar image

Danielito
1111

Strange, but glad it is working - maybe some kind of server-side problem? In any case if it happens again, please post the contents of the LastErrorText property immediately after the failing call (and you might want to set VerboseLogging = 1 as well to get a more complete log).

(Jan 10 '14 at 09:12) jpbro ♦

Of course, if it were to happen again I will surely. Thanks Daniele

link

answered Jan 10 '14 at 09:28

Danielito's gravatar image

Danielito
1111

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×131

Asked: Jan 09 '14 at 15:38

Seen: 959 times

Last updated: Jan 10 '14 at 09:28

powered by OSQA