butlerjo
asked on
Programmatic FTP using the INET control
I need to capture configuration (.cfg) files from a remote server and copy them all into a folder or specified directory on my pc. This must be done without API but i can use the library references. The connection, copying, and transfer of files must be done programatically, that is, with no user interface whatsoever. I have tried using the inet control but found that the "GET" command must have specified files written to it instead of just being able to call all the files with a wildcard (*.cfg). I guess i need a loop of some sort to grab all of the files off the ftp server and copy them at one instance onto my PC. If anyone has any suggestions and/or comments I would greatly appreciate it. Thanx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi!
I don't know if this is what you want, but here's the file:
Download...
http://www.vb-helper.com/Howto/ftpup.zip
Description: Upload a file using FTP (4K)
That's it!
glass cookie : )
PS Ignore me if it's NA.
I don't know if this is what you want, but here's the file:
Download...
http://www.vb-helper.com/Howto/ftpup.zip
Description: Upload a file using FTP (4K)
That's it!
glass cookie : )
PS Ignore me if it's NA.
Hi butlerjo,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:
Accept AndrewDev's comment(s) as an answer.
butlerjo, if you think your question was not answered at all or if you need help, you can simply post a new comment here. Community Support moderators will follow up.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:
Accept AndrewDev's comment(s) as an answer.
butlerjo, if you think your question was not answered at all or if you need help, you can simply post a new comment here. Community Support moderators will follow up.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer
Computer101
E-E Moderator
Computer101
E-E Moderator
Basically, you need to get a list of the files contained in a specific directory, which is done using the LS command on an FTP server. What you should do is connect to the FTP server using the Inet Control, and do a .execute with "LS" as your Operation parameter. Parse that result (check the help -- you have to use GetChunk), and you've got your list of all the files in that directory. Now, just move through your list, calling a GET for each file.
I haven't tested any code, but I'm pretty confident it'll do the trick. Give it a shot.