Drop Box - File Transfers

<< Click to Display Table of Contents >>

Navigation:  VBA > Imports, Exports and XML >

Drop Box - File Transfers

 

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.

 

 

201201_gr_dropboxTrans1

Figure 1 - Saving the email attachment to Dropbox on the laptop

 

 

201201_gr_dropboxTrans2

Figure 2 - Saving the email attachment to a Dropbox folder on the laptop

 

201201_gr_dropboxTrans3

Figure 3 - The Dropbox icon goes blue and spins to show the file is uploading to the Dropbox server

 

201201_gr_dropboxTrans4

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

 

        End If  

        

        strFullPath = Dir  ' Get next entry.

      Loop

 

 

 

201201_gr_dropboxTrans5

 

Figure 5 - When required I log into the server and open an Access application that processes the files on the server

 

 

201201_gr_dropboxTrans6

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.

 

Garry Robinson

Access MVP - 2006 to 2012

 

We sell FMS Tools and bundle them with other discounted and free products

 

 

Other Articles You May Wish To Read

Using FTP from Access Applications

Drop Box for MS Access
Access Database Performance
Tricky Queries