MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: checking for presence of files

  • To: mathgroup at
  • Subject: [mg24495] Re: checking for presence of files
  • From: Jens-Peer Kuska <kuska at>
  • Date: Thu, 20 Jul 2000 03:01:38 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8l3f5d$>
  • Sender: owner-wri-mathgroup at


you can search the $Path variable and some subdirectories.

The call below search for a file MGLWelcome.nb in all
directories in the 


Select[FileNames["*MGLWelcome.nb", Join[(ToFileName[
              {#, "MathGL3d", "Documentation", 
                "English"}] & /@ $Path), $Path]], # =!= {} &]

and return a list of all matches. It is typical not wise
to search the full harddisk. 


Otto Linsuain wrote:
>  Hi all. I know the answer to this could be system-dependent. I work
> with Mathematica 4.0 on unix workstations.
>  I wonder if it is possible to define a function that checks if a file
> exists in your disk, something like
>  FindFile[filename_String] = True if the file exists, False otherwise.
>  Any ideas would be appreciated. Otto Linsuain.

  • Prev by Date: more wrong integrals
  • Next by Date: Re: 12-bit Tiffs importable?
  • Previous by thread: Re: checking for presence of files
  • Next by thread: Looking for examples of instrument i/o via MathLink