aityro Posted November 13, 2015 Share Posted November 13, 2015 Hi, All:Greetings!I am new to AutoIt and have spent some time reading about possible solution to a simple task I want to do. I have read the script of some approaches by others that are for tasks more involved but I am looking for a simpler, hopefully simplest solution. I would appreciate very much if someone can show me a sample script. Here Is The Background Of The Task To Be Done:Given an url to a password protected folder, with User Name: User1 and Password: Pass1,e.g. http://Domain1.Com/Folder1/I have a text file, File1.TXT that is a very short text file, always less than 250 bytes, to be upload to it,What is the simplest way of doing the upload? Hopefully something as simple as downloading it using InetGetI have already learned to download file using InetGet, but I need to upload it after some revision and wonder if uploading can be as simple as downloading.For instance, to download File2.TXT from the above url, the simplest InetGet statement is:$Result1 = InetGet("http://User1:Pass1@Domain1.Com/Folder1/File2.TXT, "SavedFileName2.TXT", 1, 0) //where 1 forces a reload and 0 waits for completion of downloadSo the download of a file from a password protected directory is very simple as shown above.Is there some way to upload a simple, short text file via a statement that is as simple as the InetGet statement above?I would prefer not to have to deal with a form, button or PHP if possible, as this file upload process is to be done automatically and programmatically in the background, bypassing any GUI.In my case the File1.TXT is always ASCII and always less than 250 bytes, i.e. no longer than a long line, but the directory is always protected with User & Password.I hope there will be a very comparable, simple solution for upload, as there is one for download (shown above), but I have not succeeded despite hours of searching and reading.Thank you all in advance for any assistance. A sample script would be best. Link to comment Share on other sites More sharing options...
jdelaney Posted November 13, 2015 Share Posted November 13, 2015 (edited) Look into the _FTP funcs:_FTP_DirPutContents Edited November 13, 2015 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
aityro Posted November 13, 2015 Author Share Posted November 13, 2015 Look into the _FTP funcs:_FTP_DirPutContents Thanks a lot jdelaney!, for your prompt reply. That may well become what I finally settle on.After posting my original question, I also continued to search and realized that _FTP would be one possible solution that I need to explore and your helpful suggestion reinforced my current, and continuing, assessment.On the other hand, if anyone else reading this topic has other solutions, ideas, suggestions or whatever comments, please keep them coming. I remain open to possible alternatives and will be grateful to receive any and all additional input from anyone. Thank you! 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