|
-
Mar 10th, 2008, 10:35 AM
#1
Thread Starter
New Member
FTP access help !! vb6
hi guys,
i am trying to open the ftp server that i have and to create a new file in it
so
the code i am working with is " open ("c://t.text") for appened as #1 .... bla bla bla close #1 "
so is there a way to open an ftp client and to use the same command in it , and where should i put the userName and password of my ftp ?
i dont want the program users to know what is the username and the password or the ftp link !!!
is that possible !? plz help
tanks in advanced
Tamby Qunash
-
Mar 10th, 2008, 11:19 AM
#2
Re: FTP access help !! vb6
Welcome to the forums. 
Wouldn't it just be easier to modify your text file and once done, upload it to the FTP site?
-
Mar 10th, 2008, 11:26 AM
#3
Thread Starter
New Member
Re: FTP access help !! vb6
thank you, well i am trying to do a S.W to write on the FTP text file !
and to get data from there !
-
Mar 10th, 2008, 11:30 AM
#4
Re: FTP access help !! vb6
Is the text file being written to while it is on the FTP server?
-
Mar 10th, 2008, 11:38 AM
#5
Thread Starter
New Member
Re: FTP access help !! vb6
no, i want to create that text file and to write in it
as you know, i used in local pc this code ---
vb Code:
open ("C:/t/data.txt") for append as #1 print #1,data close #1
---
it will create the file and write in it, is there a way to open the FTP and do the same !! and how should i tell the program about the username and pass ?
Last edited by tambyq; Mar 10th, 2008 at 11:44 AM.
-
Mar 10th, 2008, 12:31 PM
#6
Re: FTP access help !! vb6
is there a way to open the FTP and do the same !!
Not in the same way that you are doing it on your PC. You do not open a file on a FTP server, append to it, then close it. You create your file on your PC and then send the completed file to the FTP server using FTP protocol. There is plenty of code samples around here that show you how to do a FTP download but I have not seen one that shows you how to do a FTP upload but I'm sure there is such code here. Unless you can find some example of how to upload via FTP you may have to either write your own FTP client application or use a third party FTP client like CuteFTP, for example.
-
Mar 10th, 2008, 12:58 PM
#7
Re: FTP access help !! vb6
-
Mar 12th, 2008, 05:58 AM
#8
Thread Starter
New Member
Re: FTP access help !! vb6
thank you so much for this help
-
Mar 12th, 2008, 06:15 AM
#9
Re: FTP access help !! vb6
the ftp apis are quite easy to use
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|