Question

i am using mergext dropboxsync to synchronise my data from the ipad. my question is. how we get the file from the special folder specialfolderpath and how we check if the file exist into the dropbox. i am no using fields for folder or the files i want the procedure to be hidden from the user to get my folder and path i use the simple bellow code.

put specialfolderpath("documents") & "/myfile.sqlite" into myPath

and here is the code from the button i use

on mouseUp
  goToParent --<command
  repeat for each line tempitem in fld "sFolders" --<hide field
   add 1 to t
if tempitem ="hairaid-backup" then
  put 1 into fExist
end if
end repeat
 --!! if folder exist
if fExist is a number then
else 
  try
  mergDropboxCreateFolder (hairaid &"-"&backup) 
catch e
 answer e
 end try
end if
end mouseUp
Was it helpful?

Solution

I would not really recommend synchronising a sqlite database over dropbox. You are likely to have better results creating a tree for files for dropbox to sync as one large file is likely to end up with conflicted versions.

However, answering your question in the general sense you would need to do something like this:

put url ("binfile:"&myPath) into myData
mergDropboxWriteFile relativePath,myData

Then to get the data you:

put merDropboxGetFile(relativePath) into myData
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top