Putfile gives error but can manually put file on s - WeOnlyDo Discussion board

Putfile gives error but can manually put file on s (General questions)

by jenn5175, Tuesday, March 28, 2006, 21:38 (6818 days ago)

I have an ASP page and am using VBScript to create and then upload a file. I have had this script work for FTP'ing to two other servers. I just got credentials for a third server but when I try to run the script I get the following error.
------------------------------
WeOnlyDo.wodFtpDLXCom.1 error '800a9e66'

Requested action not taken. File unavailable (e.g., file not found, no access).

/admin/priceGrabberFeed.asp, line 100 '<----means it connected correctly but failed on the putFile line
-------------------------------

I can manually log into the above server using the same credentials given to the component and upload my file just fine. The file is being created with the script so there is no chance my source path is wrong - where the script is told to create the file and grab the file for upload is set by a single variable so as long as the script creates the file (it does) the path to grab from is correct.

Here is my code:

[code]
'Beginning of code
sBasePath = c:inetpubwwwrootxxxxxxxxx
sFeedFile = priceGrabberFeed.txt

'Code to create file
'............

'Now code to upload file
set sFtp = Server.CreateObject( WeOnlyDo.wodFtpDLXCom.1 )
sFtp.LicenseKey = xxx
sFtp.Blocking = True
sFtp.passive = 0
sFtp.protocol = 0
sFtp.Hostname = xxx.xxx.com
sFtp.Login = xxx
sFtp.Password = xxx
sFtp.Connect
sFtp.RemotePath = /
'response.write sFeedFile

sFtp.PutFile sBasePath & sFeedFile, sFeedFile '<--FAILS HERE
if sFtp.LastError = 0 then
set TSO = FSO.OpenTextFile(sBasePath & sLogFile, 8, true)
TSO.WriteLine( FTP Successful: & now())
TSO.close
else
set TSO = FSO.OpenTextFile(sBasePath & sLogFile, 8, true)
TSO.WriteLine( FTP Failed: & now())
TSO.close
end if
sFtp.Disconnect
set sFtp = Nothing


[/code]

Any ideas?
Jenn


Complete thread: