PDA

Click to See Complete Forum and Search --> : Change dir and upload file on FTP!?


ermingut
Aug 29th, 1999, 04:50 PM
I have problem uploading file on specific directory on ALPHA ftp server.

I can upload to default directory but
changing directory with "CD [dir]" command
doesn't work??!! (VB5.0).

Privileges are not a problem.

THNX, Ermin

dj4
Aug 30th, 1999, 09:46 AM
Do you use Inet, Winsock or Api-function, when you call Ftp?

- Dj4

Aug 30th, 1999, 07:52 PM
Could you show us the piece of code u use?

------------------
Vincent van den Braken
EMail: azzmodan@azzmodan.demon.nl
ICQ: <A HREF="http://www.icq.com/15440110]15440110[/URL" TARGET=_blank>
[URL=http://www.azzmodan.demon.nl]http://www.azzmodan.demon.nl</A>

ermingut
Aug 31st, 1999, 09:47 AM
url="243.23.43.43" 'I provide IP address
direc = "tec"
locfile= "c:\temp\dat.txt"
hostfile = "dat.txt"
inet1.execute url , "cd " & direc
inet1.execute url , "put " & locfile & " " & hostfile

maybe this will work
hostfile = "\" & "tec" & "\" & "dat.txt"
inet1.execute url , "put " & locfile & " " & hostfile

ermingut
Aug 31st, 1999, 09:52 AM
I connect to ALPHA not just with IP address, I provide username and password as well.

------------------

dj4
Aug 31st, 1999, 09:57 AM
Try this:

direc = "tec"
locfile= "c:\temp\dat.txt"
hostfile = "dat.txt"

Inet.AccessType = icUseDefault
Inet.Protocol = icFTP

Inet.URL = "ftp.microsoft.com"
Inet.UserName = "anonymous"
Inet.Password = "guest@somewhere.com"

Inet.RemotePort = 21
Inet.RequestTimeout = 60

Inet.Execute , "CD " & direc
Do
DoEvents
Loop While Inet.StillExecuting

Inet.execute , "PUT " & locfile & " " & hostfile
Do
DoEvents
Loop While Inet.StillExecuting

- Dj4

ermingut
Aug 31st, 1999, 12:21 PM
THNX, I find about DevPower FTP ActiveX control and I wrote code that works

If FTP1.Connect("url", "un", "pw") = ftpSuccess Then
FTP1.CD "tec"
If FTP1.PutFile("C:\TEMP\TEC.TXT", "") = ftpSuccess Then
FTP1.Disconnect
End If
End If