Solved

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

Posted on 2007-11-26
3
257 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
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…

828 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