walle Posted September 9, 2007 Posted September 9, 2007 (edited) I'm using unrar.exe to determent all volumes inside a .rar file and then saving it into a .ini file. The problem is that the names of the .rar files changes depending of what I'm downloading. Every folder contains about 50 .rar files, autoit01.rar,autoit02.rar -->, every .rar file in the same folder contains the same volumes inside the rar files. My autoit and dos kwnoledge is limeted, how do I procced. I want my script to collect the names of the .rar files in the folder and then run unrar.exe or open any of the 50 .rar files using unrar.exe and list it into a .ini Tried "*.*.rar" hoping it would open one of the .rar files, but didn't work. Hope you understand =/ #include <constants.au3> $get = Run(@ScriptDir & "\" & "unrar.exe vb D:\Downloads\Autoit\*.*.rar","",$STDOUT_CHILD, @SW_MAXIMIZE) ; Determent all volumes inside a .rar file. While ProcessExists($get) ;Wait for program to finish Sleep(100) WEnd $StdOut = StdoutRead($get) ;$result = Stringright($StdOut, 6) IniWrite(@HomeDrive & "\Temp\Burnbuddy.ini", "Section5", "Image", $StdOut) MsgBox(0, "Results", $StdOut) Edited September 9, 2007 by walle
Emiel Wieldraaijer Posted September 9, 2007 Posted September 9, 2007 See the help for the following _FileListToArray StringRight Emiel Best regards,Emiel Wieldraaijer
walle Posted September 9, 2007 Author Posted September 9, 2007 So, FileListToArray seem to work, how do I determent the name of the second file in the folder, $array[2] = 2nd File\Folder? #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList")
Emiel Wieldraaijer Posted September 9, 2007 Posted September 9, 2007 The array will create a variable which can be called with the for / next statement Emiel Best regards,Emiel Wieldraaijer
walle Posted September 10, 2007 Author Posted September 10, 2007 (edited) The array will create a variable which can be called with the for / next statementEmielTried with out success, can u lend me a hand? Edited September 10, 2007 by walle
Emiel Wieldraaijer Posted September 10, 2007 Posted September 10, 2007 #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf ; $filelist[0]=the amount of files found For $i = 1 To $FileList[0] msgbox (0, "test", $filelist[$i]) Next this will display all the found files in a separate message box Best regards,Emiel Wieldraaijer
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