Re: checking for presence of files
- To: mathgroup at smc.vnet.net
- Subject: [mg24495] Re: checking for presence of files
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 20 Jul 2000 03:01:38 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <8l3f5d$ksj@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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.