Solved

how to up load a folder and put a my text file by FTP

Posted on 2007-11-26
3
249 Views
Last Modified: 2013-11-29
Hello,
i trying to make a code that can upload a text file in a folder(named by me)to my web ftp space server.how can a create a folder in that web space and put the file with the PUT instruction?
i am waiting for yours kidn response



0
Comment
Question by:aitsu01
3 Comments
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
Comment Utility
To create a directory in ftp have a look at

http://www.example-code.com/vb/ftp_createRemoteDir.asp
http://www.example-code.com/vb/ftp_passiveUpload.asp
http://www.example-code.com/vb/ftp_passiveUpload.asp
http://www.example-code.com/vb/ftp_createPlan.asp

All the examples in these sites uses a third party active x . This is just to give you some ideas. I am not sure to how much extent this will help you.
0
 

Author Comment

by:aitsu01
Comment Utility


Hello experts,
i 've attahced here my VB6 code here:

    If LCase$(Left$(host_name, 6)) <> "ftp://" Then host_name = "ftp://" & host_name
    inetFTP.URL = host_name

    inetFTP.UserName = txtUserName.Text
    inetFTP.Password = txtPassword.Text
    ora = CStr(Time)
    inetFTP.Execute , "Put " & _
          "c:\lmytextfile.txt" & vbCrLf

My purpose is to upload on the my ftp web  space the "mytextfile.txt" in a folder that i create at the moment,for example with the time .so the file it will be uploaded in the folder " /11.30.00/mytextfile.txt.
How can a create a folder like the exmaple abouve here?thank you.

0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 250 total points
Comment Utility
have you tried

inetFTP.Execute , "mkdir directory"
inetFTP.Execute , "cd directory"
inetFTP.Execute , "Put c:\lmytextfile.txt" & vbCrLf
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now