Sign in to follow this  
Followers 0
easy1ndian

For Next Loop and Do Untill

5 posts in this topic

Dears

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

-----------------------------------------------

@ECHO OFF

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

ECHO %%I

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



#3 ·  Posted (edited)

Thank you very much

IT DOES WORK!!!

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.")
    Exit
EndIf

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

FileClose($file)

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

Share this post


Link to post
Share on other sites

thank you. did it. working :P

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  
Followers 0