Starting FTP

davidam

Active Member
Joined
May 28, 2010
Messages
497
Office Version
  1. 2021
Platform
  1. Windows
I am trying to get a file uploaded to a server with FTP. There are lots of discussions about it but I seem to be stuck on the basics. It seems that ftp.exe is a program that is part of the Windows operating system...correct? It also seems that, to write code that will use FTP, ftp.exe must somehow be invoked...correct? I have seen references to using a shell file like this: Shell("ftp.exe -s:" & FtpFilePath & "ftpfile.bat", vbHide)
I wonder if anyone could shed some light on what this means.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
The short answer is that you want to do in a batch file (simply a text file listing ftp commands) exactly what you would do at the dos prompt (you can use/test ftp at the command line by typing ftp at the dos prompt - you may like to type the commands in this way just to see how they work).

A fairly good walkthrough is here (the author first writes and saves the script itself in code, then executes the script in code):
http://www.tfcwpa.com/msaccess/ftpscript.htm

My successful attempt at this is described here:
http://www.mrexcel.com/forum/showthread.php?t=488454&highlight=shell

Be forewarned that ftp is not a secure protocol and passwords are sent in plain text without encryption. Also, for what it's worth, you can use windows explorer as a gui ftp client, and by opening another window on your pc you can just drag and drop files for transfer:
http://www.learnwebdesignonline.com/misc-tutorials/explorer-ftp-client.htm
I typically use Filezilla for secure connections, if possible. There are many good ftp clients available.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,526
Messages
6,185,471
Members
453,296
Latest member
zashue22

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top