Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #655
| From | ab <ab.3942@googlemail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: How to test if a file exist ? (to plot or not) |
| Date | 2011-10-21 05:32 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <5176e2a3-1485-4e41-a179-f7a4cf03d5b2@x20g2000vbl.googlegroups.com> (permalink) |
| References | <4e8dd9f3$0$30772$ba4acef3@reader.news.orange.fr> |
On 6 Okt., 18:40, Philippe Marsault <philippe.marsa...@freeeee.fr>
wrote:
> Dear all,
>
> I wish to test if curve-1.dat and curve-2.dat exist before to use the
> plot directive with multiple file.
>
> How to proceed ?
>
> Thanks in advance for your help and this excellent soft.
> --
> Pour répondre en direct, virez les eeeeee free de trop
>
> <°)))- Philippe -<<<
Use
isexist= system ("file curve-1.dat | grep ERROR")
if ( strlen(isexist) == 0 ) : file exists
The file command returns a string including ERROR if the file is
notexisting.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
How to test if a file exist ? (to plot or not) Philippe Marsault <philippe.marsault@freeeee.fr> - 2011-10-06 18:40 +0200 Re: How to test if a file exist ? (to plot or not) ab <ab.3942@googlemail.com> - 2011-10-21 05:32 -0700
csiph-web