quicksilver Posted August 15, 2005 Share Posted August 15, 2005 (edited) Hello i've got a Problem. I had written a little Program to Convert some txt Files into PDF. The job of Autoit it is to look into a folder .. list the Files and Start a Program in a loop that converts the txt file into PDF. After ca. 60-70 files autoit stops an post an Error that too much files are open. How can i Fix this Problem? Sorry for my BAD English. Thx for Help. Edited August 15, 2005 by quicksilver Link to comment Share on other sites More sharing options...
Lazycat Posted August 15, 2005 Share Posted August 15, 2005 This is a system limitation. It's can be increased, but this is extensive way. Most likely this is mistake in the your script, that open too many files at once. Look in your script to avoid situation, when you open another file when not closed previous. Or post your script here. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
quicksilver Posted August 15, 2005 Author Share Posted August 15, 2005 expandcollapse popup$ini_file = "dirlist.ini" $file = FileOpen($ini_file, 0) ; Variablen einlesen $program = FileReadLine($file,1) $workdir = FileReadLine($file,2) $sicherung = FileReadLine($file,3) $filenames = FileReadLine($file,4) FileClose($file) $search = FileFindFirstFile($filenames) ; Check if the search was successful If $search = -1 Then ;MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop $execute = $program&" "&$workdir&$file $source = $workdir&$file $dest = $sicherung&$file RunWait($execute,$workdir) FileMove($source, $dest) ; --- logfile $files = FileOpen($ini_file, 0) ; Variablen einlesen $pretext = FileReadLine($files,5) $logfile = FileReadLine($files,6) $aftertext = FileReadLine($files,7) FileClose($files) $Input_Date = @MDAY & "-" & @MON & "-" & @YEAR $Input_Time = @HOUR & ":" & @MIN & ":" & @SEC $thetime = "Datum und Uhrzeit: "&$Input_Date&" - "&$Input_Time&" - "&$file ; Logfile Erstellen $files = FileOpen($logfile, 1) FileWriteLine($files, $pretext) FileWriteLine($files, $thetime) FileWriteLine($files, $aftertext) ; --- logfile WEnd ; Close the search handle FileClose($search) Link to comment Share on other sites More sharing options...
LxP Posted August 15, 2005 Share Posted August 15, 2005 ··· ; Logfile Erstellen $files = FileOpen($logfile, 1) FileWriteLine($files, $pretext) FileWriteLine($files, $thetime) FileWriteLine($files, $aftertext) FileClose($files); *** ; --- logfile ··· Link to comment Share on other sites More sharing options...
/dev/null Posted August 15, 2005 Share Posted August 15, 2005 ··· FileClose($files); *** ; --- logfile ···Or use _FileWriteLog().CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
quicksilver Posted August 15, 2005 Author Share Posted August 15, 2005 Yeah it works Thx Lxp 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