Kovitt Posted June 20, 2008 Share Posted June 20, 2008 (edited) Hey, I am trying to bundle two files along with my script when I compile. And I am doing something wrong with the FileInstall(). Any suggestions. I am new to AutoIT CODE #Include <File.au3> #Include <Array.au3> FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\Names.txt", @MyDocumentsDir & "\ADR_FTP_Search", 1) FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\tada.wav",@MyDocumentsDir & "\ADR_FTP_Search", 1) $count = 0 $PC_File = FileOpen("Names.txt",0) While True $CompName = FileReadLine($PC_File) If @error = -1 Then ExitLoop EndIf $count = $count+1 $Files = _FileListToArray("\\"&$CompName&"\c$\adr\data") If @error = 1 Then $Files_Re = _FileListToArray("\\"&$CompName&"\c$\adr\data") If @error = 1 Then ping($compName) If @error =2 Then MsgBox(0, "Error", "Unable to connenct to Machine "&$CompName&"!") EndIf EndIf Else If @error <> 4 Then If $Files[0] >= 10 Then MsgBox(1,"ADR FTP", "The Machine "&$CompName&" is not executing the ftp service.") EndIf EndIF If Mod($count,10) = 0 Then MsgBox(0,"Update:","Currently Scanning "&$CompName) EndIf EndIf Wend SoundPlay("tada.wav",0) MsgBox(0,"Complete","The Scan has succesfully been completed.") Thanks A ton! Edited June 20, 2008 by Kovitt Link to comment Share on other sites More sharing options...
Bowmore Posted June 20, 2008 Share Posted June 20, 2008 You need to supply the destination file names in addition to the location FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\Names.txt", @MyDocumentsDir & "\ADR_FTP_Search\Names.txt", 1) FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\tada.wav",@MyDocumentsDir & "\ADR_FTP_Search\tada.wav", 1) "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Kovitt Posted June 20, 2008 Author Share Posted June 20, 2008 Thanks!!! Fixed my problem. The Help file isnt very descriptive on this topic.. Link to comment Share on other sites More sharing options...
MHz Posted June 20, 2008 Share Posted June 20, 2008 The destination path of the file with trailing backslash if only the directory is used. This can be a variable. Modified the FileInstall() lines with the required trailing backslash as destination. FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\Names.txt", @MyDocumentsDir & "\ADR_FTP_Search\", 1) FileInstall("C:\Documents and Settings\OvittKe\My Documents\scripts\ADR\tada.wav", @MyDocumentsDir & "\ADR_FTP_Search\", 1) 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