Server Error No such file or folder At PutFil - WeOnlyDo Discussion board

Server Error No such file or folder At PutFil (wodSFTP / wodSFTP.NET / wodSFTPdll)

by voxio, Thursday, September 08, 2005, 08:36 (7016 days ago)

i want to upload local file via sftp(used by SFTPdll-PutFile method).

but 30018 value returned (ServerErrorCode : 2 - No such file Or folder).

so, i created null file(filename eqaul to local file) at remote path before calling PutFile method(source not modified), and then i could upload local file successfully via PutFile method...

why can't i create file at remote path by PutFile method?
if remote file must be exist before PutFile, do support create file method like MakeDir method?

Re: Server Error

by wodSupport, Thursday, September 08, 2005, 10:30 (7016 days ago) @ voxio

Voxio,

it's hard to say why server returns 30018. Did you specify full path in PutFile method call? What path did you specify exactly?

Re: Server Error

by voxio, Thursday, September 08, 2005, 11:37 (7016 days ago) @ wodSupport

Thanks for advicing...

if not specify full path in PutFile method call, but just remote file exist on remote path before, PutFile method call is successful...

what is the reason for? ^^;

Voxio,

it's hard to say why server returns 30018. Did you specify full path in PutFile method call? What path did you specify exactly?

Re: Server Error

by wodSupport, Thursday, September 08, 2005, 11:39 (7016 days ago) @ voxio

Voxio,

I'm sorry, I didn't understand above post. Can you rephrase it please?

Re: Server Error

by voxio, Thursday, September 08, 2005, 15:33 (7016 days ago) @ wodSupport

I tried to upload a file using sftp(I used PutFile method for this), but an error code was returned from the method which is the ServerErrorCode : 2 meaning No such file Or folder .

So, I created an empty file(filename eqaul to local file) at remote site before using PutFile method. Now i was able to upload the local file successfully using PutFile method...

If I pass the method the full path name, the method works. But is I pass a relative path name, the method does not work. Is there a method that can be used with relative path name to upload a file.

For example instead of using /home/etc/a.txt , I want to use a.txt , but ofcourse I've changed my path to /home/etc/ before using it.

Re: Server Error

by wodSupport, Thursday, September 08, 2005, 17:19 (7016 days ago) @ voxio

But one of requirements for wodSFTP is to use full paths, not relative paths. That's the whole point.

You cannot change wodSFTP's behavior, and if you try to use relative paths then unexpected things may happen - just like you experienced.

What I suggest is always to keep full path in one variable, and then just append filename to it and give to PutFile method.

Re: Server Error

by DarrenS, Thursday, September 15, 2005, 15:41 (7009 days ago) @ wodSupport

But one of requirements for wodSFTP is to use full paths, not relative paths. That's the whole point.

I am trying to use wodSFTP.NET to upload files to a customer's SFTP server. When trying to upload a file I get the No such file or folder error message from the server. My PutFile statement is as follows:

[code]ftpclient.PutFile( /test/testsftp.txt , /test/testsftp.txt );[/code]

I am pretty sure that the remote directory, '/test', is a virtual directory. I have no problem connecting the remote server and uploading to the remote directory using FileZilla or psftp.

Any ideas?

Re: Server Error

by wodSupport, Thursday, September 15, 2005, 16:10 (7009 days ago) @ DarrenS

Darren,

I cannot know why this fails, but what I would suggest you is to check if folder is really there.

So, instead of calling PutFile do this:[code]ftpclietn.ListDir( /test )[/code]does that work? If it does, then try to[code]ftpclient.PutFile( c:\test\testsftp.txt , /test ) <== only specify folder, not file[/code]if this still fails, let me know, we'll see what to do next.