Belini Posted April 21, 2018 Posted April 21, 2018 (edited) I'm trying to upload and download text files to google drive but I did not succeed, can anyone give a tip? $server = 'drive.google.com/drive/my-drive' $username = 'belinioliveira@gmail.com' $pass = 'mypassword' $Hand = _FTPOpen('Doesnt Matter') Sleep(200) _FTPConnect($Hand, $server, $username, $pass) Sleep(200) If @error Then _FTPConnect($Hand, "http://" & $server, $username, $pass) If @error Then MsgBox(0, "Error", "Connect") EndIf Sleep(200) _FTPGetFile($Hand, '/Test.txt', @ScriptDir & '\Test.txt') If @error Then MsgBox(0, "Erro", "Download error") Else MsgBox(4096, "OK", "Download OK") EndIf Sleep(200) IniWrite(@ScriptDir & '\Test.txt', 'DATA', 'value', '1') Sleep(200) _FtpPutFile($Hand, @ScriptDir & '\Test.txt', '/') If @error Then MsgBox(0, "Erro", "Upload error") Else MsgBox(4096, "OK", "Upload ok") EndIf _FTPClose($Hand) Edited April 21, 2018 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
TheDcoder Posted April 21, 2018 Posted April 21, 2018 I don't think Google Drive allow FTP access EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Belini Posted April 21, 2018 Author Posted April 21, 2018 and is there any other way I can access the google drive? My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
TheDcoder Posted April 21, 2018 Posted April 21, 2018 Maybe you can use this software as an FTP bridge to google: https://github.com/andresoviedo/google-drive-ftp-adapter EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Belini Posted April 21, 2018 Author Posted April 21, 2018 6 hours ago, aa2zz6 said: Have you tried using the google drive API? I have not tried but I will search on google drive API My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
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