Progh0st Posted December 15, 2015 Share Posted December 15, 2015 I'm trying to use command prompt to upload files to my ftp server since i don't need to install any extra software for it. I'm coding a simple autoit script to do the job for me, but i'm havng issues when i write to CMD.ControlSend("[CLASS:ConsoleWindowClass]", "", "", "cd " & @UserProfileDir) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0) ;Sleep(3000) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "ftp IP", 0) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0) ;Sleep(3000) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "Username", 0) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0) ;Sleep(3000) ControlSend("[CLASS:ConsoleWindowClass]", "", "", "Password", 0)Everything goes well until i get to the password part where cmd won't acept ControlSend to write in my password. And i don't want to use "Send" as an option because that would need CMD to be on focus. Anyone can help me here? Link to comment Share on other sites More sharing options...
orbs Posted December 15, 2015 Share Posted December 15, 2015 silly question -... upload files to my ftp server ...have you tried the FTP UDF that ships with AutoIt, or the SFTP UDF from the Example Scripts forum? Progh0st 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted December 15, 2015 Share Posted December 15, 2015 There is a FTP UDF distributed along with AutoIt, Check the help file Progh0st 1 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 Link to comment Share on other sites More sharing options...
Progh0st Posted December 15, 2015 Author Share Posted December 15, 2015 Sorry i'm new to this lol, i had no idea about those UDF! You have save me so much work. 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