Hi All,
I have spent considerable time searching the Internet to import the following text file.
However I can not get the following code to download the file as a start.
Any ideas?
Public Sub FTPFromUnix()
Dim fs As Variant
Dim FTPScript As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
Set FTPScript = fs.CreateTextFile("C:\Documents\FTP\FTPXfer.txt", True)
With FTPScript
.Writeline ("User")
.Writeline ("OPEN ftp://ftp.marketvectorsetf.com/")
.Writeline ("CD /Baskets/")
.Writeline ("LCD C:\Documents\FTP")
.Writeline ("BINARY")
.Writeline ("GET MVBBSK20150525.txt")
.Writeline ("BYE")
End With
Call Shell("C:\Windows\System32\ftp.exe -ns:C:\Documents\FTP\FTPXfer.txt", vbMaximizedFocus)
End Sub
Thanks
Bookmarks