Code archives/Networking/FTP in a nutshell
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
You must type all by yourself, its not as easy as BlitzFTP ^_^. for ftp-infos see: ftp://ftp.isi.edu/in-notes/rfc959.txt in fact its quite useless, but easy to understand... to get started, type: [adress] USER [username] PASS [password] HELP | |||||
ftp$ = Input("Adress>") com = OpenTCPStream(ftp$,21) Repeat l$ = ReadLine$(com) Print l$ i$ = Input(">") WriteLine com, i$ Until i$ = "quit" |
Comments
| ||
What is that it? |
| ||
whats the point of this? a command connections is useless without the data connection. |
| ||
;use ftp to get a file from a ftp. filename' GET_FTP ("www.tiberion.com","username","password","Game\demo\","Tiberion.zip","C:\Temp") Function GET_FTP(FTPserver$,usr$,psw$,remotedir$,filename$,dir$) DeleteFile dir$+"\"+filename$ fileout=WriteFile("script.txt") WriteLine fileout,"open "+FTPserver$ WriteLine fileout,usr$ WriteLine fileout,psw$ WriteLine fileout,"binary" WriteLine fileout,"CD "+remotedir$ WriteLine fileout,"LCD "+dir$ WriteLine fileout,"GET "+filename$ WriteLine fileout,"BYE" CloseFile fileout ExecFile ("ftp -s:script.txt") dir$=dir$+"\" While FileSize (dir$+filename$)<1 Print "Awaiting transfare "+dir$+filename$+":SIZE:"+FileSize (dir$+filename$) Delay 250 Wend Print "Done" End Function |
Code Archives Forum