Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import specification to select filename with latest date

Status
Not open for further replies.

CeleAZ

Technical User
Feb 24, 2007
9
US

I need to have Access 2K select several files with Filename* based on the latest date from an ftp site. [ftp: Folder/Filename example: "Incoming\ABCD 20070223.csv"] and then download them to a Windows folder: C:\Projects\DataFiles\Filename*.*

Can VBA or SQL do this? If so, could someone help me out with the code?

One other question: Is there a way to automate going through queries and updating filenames in SQL coding with that date string? This is time-consuming and allows possibility of error while modifying in six different queries.

Is this possible in VBA? I'm not very familiar with SQL.

Thanks loads for help with this!!
CeleAZ

 
I replaced the previous Shell command with the one from PH above.

The FTP1 file shows:
Open ftp://ftpus*...com/"
User UserName
Password
bye


The gen_CSVFilelist.dat shows:
ftp> Unknown host ftp://ftpus2etc.com/

ftp> Open ftp://ftpus2etc.com/
Not connected.

ftp> User UserName
Invalid command.

ftp> Password
Not connected.

ftp> cd Incoming
Not connected.
bye

I dbl checked the path to my ftp site and it matches the URL shown.

Is there unnecessary redundancy doing on in code, for one thing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top