FlashpointBlack Posted December 12, 2013 Share Posted December 12, 2013 I looked for awhile on the forums and Google in general, and I couldn't find any code that returned the path to the base dropbox folder, so I wrote this small snippet. I hope this helps someone! Now, all my computers and virtual machines can run easily easily by referring to it as simply DropboxFolder(). This small script REQUIRES the installation of a base64 decoder. Here's the one I use, written by Ward: '?do=embed' frameborder='0' data-embedContent>> ; #FUNCTION# ;=============================================================================== ; ; Name...........: DropboxFolder ; Description ...: Simply returns the file path to the currently logged on user's dropbox folder ; Syntax.........: DropboxFolder() ; Parameters ....: ; Return values .: Success - Returns the dropbox folder path ; Failure - Returns 0 and Sets @Error: ; |0 - No error. ; |1 - Dropbox settings file not found in @appdatadir & "\Dropbox" ; |2 - Folder path returned does not exist (possibly an error with decoding) ; Author ........: FlashpointBlack ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; No ; ; ;========================================================================================== Func DropboxFolder() if not fileexists(@appdatadir & "\Dropbox\host.db") then ;file does not exist SetError(1,0,0) EndIf $Folder = _Base64Decode(FileReadLine(@appdatadir & "\Dropbox\host.db", 2)) if not FileExists($Folder) then ;returned folder does not exist SetError(2,0,0) endif Return $Folder Endfunc oapjr 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now