Re: [U2] test for a unix file?

2008-03-04 Thread doug chanco
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

RE: [U2] test for a unix file?

2008-03-04 Thread Bill Haskett
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

Re: [U2] test for a unix file?

2008-03-04 Thread Scott Ballinger
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

RE: [U2] test for a unix file?

2008-03-04 Thread David A. Green
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

Re: [U2] test for a unix file?

2008-03-04 Thread Ray Wurlod
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

RE: [U2] test for a unix file?

2008-03-03 Thread Jef Lee
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

Re: [U2] test for a unix file?

2008-03-03 Thread doug chanco
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

Re: [U2] test for a unix file?

2008-03-03 Thread Craig Bennett
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