Solved

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

Posted on 2007-11-26
3
250 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
ID: 20348947
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
ID: 20349074


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
ID: 20349349
have you tried

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

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Please see preceding article here: http://www.experts-exchange.com/Networking/Operating_Systems/A_11209-Root-Bridge-Election.html Figure 1 After Root Bridge has been elected, then what?..... Let's start by defining a Root Port in la…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

896 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

21 Experts available now in Live!

Get 1:1 Help Now