Jump to content

newphpuser

Members
  • Posts

    3
  • Joined

  • Last visited

newphpuser's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I mean, just exiting the program for then. But, how can I ask it to continue reading the remaining text file, but NOT read the part before the previous date & time? Like, in this case, if it finds Jan 27 2012 12:12:57, I want to force it to read the text STARTING from this record and forget the previous records, so as to avoid duplication-- which may occur if it reads older records.
  2. Thanks! :)And what about the second part? If the second time is greater, continue reading the whole file and performing some actions. If not, just terminate. How should I go about that?
  3. Hello Everyone, I have different entries in a log file in the form: ================================================[Jan 27 2012 12:10:35] - ID2PDF v.2.6 (ID2PDF.jsx)General options: [default] (ID2PDF_options.xml)================================================Loaded options from XML file: 'path/to/file/some_file.xmlextendedPrintPDF startedextendedPrintPDF: Error: Unsaved documents have no full name.; line: 332================================================[Jan 27 2012 12:12:57] - ID2PDF v.2.6 (ID2PDF.jsx)General options: [default] (ID2PDF_options.xml)================================================Error opening document: path/to/file/some_file1: Error: Either the file does not exist, you do not have permission, or the file may be in use byanother application; line: 190Error opening document: path/to/file/some_file2: Error: Either the file does not exist, you do not have permission, or the file may be in use byanother application; line: 190 I want to grab the time in the first line of the record (I can manage that with a RegEx, alright!) and then compare it with the time of the next entry (in this case, with Jan 27 12:12:57). And if the second time is greater than the first, I want to read the rest of the text file and do a bunch of other things.Is it possible to do this?NOTE: The entries may have records of any number of lines, but each entry is separated by the === delimiter.
×
×
  • Create New...