MathGroup Archive 2000

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

Search the Archive

Re: checking for presence of files


Hi,

you can search the $Path variable and some subdirectories.

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

APathDirectory/MathGL3d/Documentation/English


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. 

Regards
  Jens


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