Solved

Access VBA to copy files between FTP folders

Posted on 2015-02-06
4
373 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
[X]
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
  • 2
4 Comments
 
LVL 50

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 58

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 50

Expert Comment

by:Gustav Brock
ID: 40613720
You are welcome!

/gustav
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

691 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