Solved

Access VBA to copy files between FTP folders

Posted on 2015-02-06
4
326 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now