In the following 6 pictures, I will show you how I move files to a remote PC using Dropbox. This involves the following steps
•save attachment(s) into a DropBox folder
•this automatically moves the files to the clients LogMeIn machine
•I then log into that PC across the internet and open the database
•I find the file(s) in Dropbox using VBA
•I move/rename the files using VBA.
If it sounds tricky, it isn't. Its actually a lot easier than moving files through email or FTP upload/downloads.
Figure 1 - Saving the email attachment to Dropbox on the laptop
Figure 2 - Saving the email attachment to a Dropbox folder on the laptop
Figure 3 - The Dropbox icon goes blue and spins to show the file is uploading to the Dropbox server
Figure 4 - At any stage on my laptop I can check how many files I need to work on on the server by looking in the Dropbox folder
I then log into the server using LogMeIn. In the database, I loop through all the files in the Dropbox folder and then move them as in the following snippet
strFullPath = Dir(strTmpDir & "\*." & strPDFext) ' Retrieve the first entry.
Do While strFullPath <> "" ' Start the loop.
' Ignore the current directory and the encompassing directory.
If strFullPath <> "." And strFullPath <> ".." Then
ipos1 = InStr(strFullPath, "_") + 1
strDocument = Mid(strFullPath, ipos1, 10) & QCPDF
MsgBox "Moving " & strTmpDir & "\" & strFullPath & vbCrLf & " to " & vbCrLf & strLabfilesFolder & QCFOLDER & strDocument
On Error Resume Next
Name strTmpDir & "\" & strFullPath As strLabfilesFolder & "QC\" & strDocument
strFullPath = Dir ' Get next entry.
Figure 5 - When required I log into the server and open an Access application that processes the files on the server
Figure 6 - This is what you see on your laptop when a file is moved or deleted from the Dropbox folder on the server.
That is how I use Dropbox to transfer files. The key benefit is that you only ever deal with files and folders rather than internet uploads and downloads. The other benefit it that you can see the status of files by looking at the files locally in the the Dropbox folder.
Access MVP - 2006 to 2012
Other Articles You May Wish To Read