Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access VBA to copy files between FTP folders

Posted on 2015-02-06
4
343 Views
Last Modified: 2015-02-17
Hi,
Does anyone have a simple solution for this:
I need to backup all files from one folder to another on an FTP server (I already have code to connect and download)
0
Comment
Question by:HKFuey
  • 2
4 Comments
 
LVL 49

Assisted Solution

by:Gustav Brock
Gustav Brock earned 150 total points
ID: 40593528
Your code will contain a Get or MGet command.
To upload files, use the command Put or MPut.

/gustav
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 350 total points
ID: 40593624
Do you actually have access to the sever from the OS?  If so, it's just a local file copy.   You don't need to do it through the FTP service.

If you do it through the FTP service, then as gustav said, Get/Put and MGet/Mput.

 A word of caution on that however; if you use MDel as part of the process, be very careful if you have on-going operations that may upload files while your working with them.

Example:  You do a MPUT() to make copies, followed by a MDEL().   In the meantime, new files have been uploaded between the PUT and the DEL and you end up deleting files you have not moved.

If you are doing delete operations, you need to take a snapshot of all the files in the directory, do whatever, then delete using the snapshot list.  That way, no new files are deleted.

 If your just archiving off a copy with no deletes, then you can use MPUT() fine.
Jim.
0
 

Author Closing Comment

by:HKFuey
ID: 40613719
Thanks for the help
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40613720
You are welcome!

/gustav
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question