Solved

Access VBA to copy files between FTP folders

Posted on 2015-02-06
4
338 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

776 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