Get File from FTP Server into Access

one3nine0

Board Regular
Joined
Jul 21, 2014
Messages
127
There is a file in a FTP server that I would like to download into MS Access 2010 to replace the old version of the file when I run the code/macro. We will call the table "PriceFile"

To get to the server I usually open a browser and enter "ftp://XX.XX.XXX.XXX", enter in user and pw, and then select the desired file to download to a folder on my computer.

I would rather have it download straight into Access so i don't have to go through the extra steps.

The file is usually YYYYMMDDPRICES.TXT, and I want to download the most recent one.

Is this doable in Access? I've seen other versions, but you need to type in the actual file name, where I just want to grab the most recent file.
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,793
Office Version
  1. 2019
Platform
  1. Windows
1) strictly speaking you cannot download an ftp file "straight into access". But you can download a file to a local folder and then import the file into Access. So all you really need to do is automate or script the file transfer.

2) I don't know of an easy way to get a particular unknown but latest file that fits all situations. If the latest file is always todays file, than you can simply use todays date as your YYYYMMDD key. That is nearly always available in scripts and code as a kind of date() function.
 
Last edited:

one3nine0

Board Regular
Joined
Jul 21, 2014
Messages
127
Ok, I was hoping not to have to download the file before running the code or script to import it into access. No worries though. Thanks for the info
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,315
Members
414,053
Latest member
Dual Showman

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
Top