Jump to content

I need help with Dos command


Recommended Posts

2, i have this code in order to login ftp in dos

Runwait(@ComSpec & " /k "& "ftp www.darksoul.110mb.com",@WindowsDir,@SW_SHOW)
opt("WinTitleMatchMode",2)
controlsend("cmd.exe","User <www.darksoul.110mb.com:<none>>:","","darksoul")
controlsend("cmd.exe","Password :","","xamplepass")

but in the line ask for username :

User <www.darksoul.110mb.com:<none>>:

the darksoul wasn't type in, some body can help me ?

Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

You would need to use StdinWrite to write to the command prompt window. An easier way is just use an FTP script. ftp -s:scriptname ftp.whatever.org. The script is just a simple text file with the commands you want to run. Here's a little example using the script to login, and then stdinwrite to get the file. (It downloads Firefox version 3 beta 3). Note this is kind of ugly, as I'm not too good at using autoit with the command prompt. But until someone better comes along hopefully this will give you some ideas.

#include <Constants.au3>

$foo = Run(@ComSpec & " /c ftp -s:test.scr ftp.mozilla.org","c:\",@SW_HIDE,$STDIN_CHILD + $STDOUT_CHILD)

ConsoleWrite(StdoutRead($foo))
StdinWrite($foo,"get " & Chr(34) & "Firefox Setup 3.0 Beta 3.exe" & Chr(34) & @CRLF)

The script file is just a list of commands. eg open up notepad and create file c:\test.scr and paste in the following:

anonymous

cd /pub/firefox/releases/3.0b3/win32/en-US

(the blank line after "anonymous" is for the password. no password needed on ftp.mozilla.org)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...