Jump to content
Sign in to follow this  

For Next Loop and Do Untill

Recommended Posts


I am using the following batch script to install Windows patches on new machines



FOR %%I IN (WindowsXP*.exe) DO (


START WAIT %%I /quiet /norestart



How can i achieve the same result using AutoIT v3 with error logging. I've tried using the help available. I am not a programmer.

I would appreciate if someone could help me out

thank you

Share this post

Link to post
Share on other sites

Thank you very much


I need a minute modification though. at present the consolewrite(i think) writes the filenames one after another without space. how can I have each file name in new lines and everything written to a text file

EDIT: 'new line' got it working using the example from AutoIT help

but still need output to text file

Edited by easy1ndian

Share this post

Link to post
Share on other sites

FileWriteLine from the helpfile:

$file = FileOpen("test.txt", 1)

; Check if file opened for writing OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")

FileWriteLine($file, "Line1")
FileWriteLine($file, "Line2" & @CRLF)
FileWriteLine($file, "Line3")


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...