problem with checking alt file

From: in2minds (karl_at_redx.co.uk)
Date: 11/30/03


Date: Sun, 30 Nov 2003 15:08:34 -0000

using this...

if (x == y)
{
 $url = "file.txt";
 $num = @file($url);

  if ($num === FALSE) // 3 =
    {
   $url = "otherfile.txt";
  $num = file($url);
    }
continue with the script using value of $num ...
}

it's checking for the first file and will return "fail" if I replace the
second file check with echo fail;

but it doesn't seem to look at the second file and grab the contents
also the timeout seems to take forever (up to 3 minutes) for the first
file check, is it possible to restrict this to 30 seconds ?

thanks
Les



Relevant Pages

  • Re: [OT] Accepting files (question)
    ... The way I operate the program under Windows XP is to make a shortcut icon ... it detect and use that second file. ... A shell script can solve the problem. ... The first time it creates a temporary driver script to later call your ...
    (comp.os.msdos.djgpp)
  • Re: [OT] Accepting files (question)
    ... The way I operate the program under Windows XP is to make a shortcut icon to my program on the task bar, then I select the input filewith Wndows Explorer, drag it onto the shortcut icon, and drop them. ... What I want to do is drop the document to be encrypted on the program's shortcut icon to fire it up, then have it wait till a second file is dropped on it, and have it detect and use that second file. ... The first time it creates a temporary driver script to later call your program with the dropped file as the first argument. ...
    (comp.os.msdos.djgpp)
  • Re: array values not visible outside while loop? scope issue?
    ... Can you please explain your script a bit so that I can ... The program will read the first file and then the second file ... awk is really great for processing files. ...
    (comp.lang.awk)
  • Re: Need a script to compare two files
    ... "Tom Lavedas" wrote: ... I am looking for a script to compare two files. ... Scan second file using the words from first file. ... strOut = strOut & data & vbCrLf ...
    (microsoft.public.scripting.vbscript)
  • Re: Need a script to compare two files
    ... I am looking for a script to compare two files. ... Scan second file using the words from first file. ... if not fname = "" Then ... strOut = strOut & data & vbCrLf ...
    (microsoft.public.scripting.vbscript)