le or directory .
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Ballinger
Sent: Tuesday, March 04, 2008 8:28 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] test for a unix file?
Thanks all; "test -e" (for files) or
M
>To: u2-users@listserver.u2ug.org
>Subject: Re: [U2] test for a unix file?
>
>Thanks all; "test -e" (for files) or "test -d" (for directories) seems to be
>what I was looking for.
>What is DIR() ?
>I don't find it in HELP BASIC DIR and it won't c
Thanks all; "test -e" (for files) or "test -d" (for directories) seems to be
what I was looking for.
What is DIR() ?
I don't find it in HELP BASIC DIR and it won't compile (no matter how I use
it I get "array DIR never dimensioned").
/Scott
On Tue, Mar 4, 2008 at 6:33 AM, David A. Green <[EMAIL P
I use DIR() Function.
Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott Ballinger
Sent: Monday, March 03, 2008 6:28 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] test for a unix file?
I
If all the files are in the same directory, use OPENPATH to open the directory
into a common variable (if it's not already open), then use READV with 0 as the
field number.
FUNCTION DOODLE(DIRPATH,FILENAME)
COMMON /DOODLE/FILEVAR
IF FILEINFO(FILEVAR,0)
ELSE
OPENPATH (DIRPATH) T
Scott,
Change your Unix command to:-
EXECUTE "SH -c 'test -e ":FILENAME:" && echo yes || echo no'" CAPTURING XXX
XXX will contain "yes" or "no" depending on whether the file exists. That is
subject to your access to the file and it parent folder tree. So "no" could
mean that the file cannot b
I have not had time to test this with lots of files BUT you can try it
(I think it will be much faster than what your doing in your code BUT I
may be wrong)
anyway what I did was create a simple shell script that you call with a
FULLY pathed file name (unless you are in the directory that you w
Hi Scott,
how about OPENSEQ?
or if the files are in your local account (and are not subdirectories)
OPEN "&UFD&" TO UFD ELSE STOP
READV EXISTS FROM UFD, FILENAME, 0 ON ERROR
ANS = @FALSE
END THEN
ANS = @TRUE
ELSE
ANS = @FALSE
END
HTH,
Craig
Scott Ballinger wrote:
I have a standar