Access VBA to copy files between FTP folders

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)
HKFueyAsked:
Who is Participating?
 
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor PresidentCommented:
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
 
Gustav BrockConnect With a Mentor CIOCommented:
Your code will contain a Get or MGet command.
To upload files, use the command Put or MPut.

/gustav
0
 
HKFueyAuthor Commented:
Thanks for the help
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.