Hi

I am getting an error when I send multiple files my code is as follows:

strExistingFile = GetImagePath() & "" & intInvNum & "-1.jpg"

'if it exists then load it If FileExists(strExistingFile) Then strGlobalFTPFilename = strExistingFile client.PutFile(strExistingFile, GetFTPImageFolder() & intInvNum & "-1.jpg") End If

'Now the second strExistingFile = GetImagePath() & "" & intInvNum & "-2.jpg"

'if it exists then load it If FileExists(strExistingFile) Then strGlobalFTPFilename = strExistingFile client.PutFile(strExistingFile, GetFTPImageFolder() & intInvNum & "-2.jpg") End If

The first file will load but the second throws an exception:

Cannot send command to server because response for previous one was not received.

The files I am tryimg to send arre around 50k.

Any help would be appreciated.

Nick Steele

asked 12 Aug '11, 17:54

NickS's gravatar image

NickS
15
accept rate: 0%

edited 11 Oct '11, 17:09

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310

This exception is usually thrown when one method fails with a timeout exception which is ignored. Would it be possible to create a communication log using Ftp object's LogWriter property (as described at http://www.rebex.net/kb/logging.aspx) and add it to your post or mail it to support@rebex.net? That should make it possible to tell what is going on.

(12 Aug '11, 18:32) Lukas Pokorny ♦♦

It turned out this was caused by calling client.SendCommand("SITE CHMOD 666 file.txt") without the corresponding FtpResponse response = client.ReadResponse(); before transferring the file.

link

answered 15 Aug '11, 08:51

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

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:

×152
×16

Asked: 12 Aug '11, 17:54

Seen: 270 times

Last updated: 11 Oct '11, 17:09