[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FindFile ?





Geraldine Verriere wrote:
> 
> Hello
> I'm trying to find a file given only the disk name (A kind of improved
> findFile).
> Thanks for help
> 
> Geraldine
> 

Dear Geraldine,

you may use our file_search routine.

http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_html/dbase/download/file_search.tar.gz


; Copyright (c) 1999, Theo Brauers, Forschungszentrum Juelich GmbH ICG-3
; All rights reserved. Unauthorized reproduction prohibited.
; This software may be used, copied, or redistributed as long as it is
not
; sold and this copyright notice is reproduced on each copy made.  This
; routine is provided as is without any express or implied warranties
; whatsoever. Email bug reports to th.brauers@fz-juelich.de
;
;+
; USERLEVEL:
;   TOPLEVEL
;
; NAME:
;   file_search
;
; PURPOSE:
;   This function searches a file in the current directory or in a list
of directories
;   This function does return the first file which was found to match
the search
;   criterion. Use the wild cards '*' or /LIST keyword to return a full
list.
;
; CATEGORY:
;   PROG_TOOLS/FILES
;
; CALLING SEQUENCE:
;   Result=FILE_SEARCH(Name)
;
; INPUTS:
;   Name:   name of a file or wildcards
;
; KEYWORD PARAMETERS:
;   DIRECTORIES:    string (array) containing a list of directories to
be searched
;   NO_CURRENT:     if set the current directory is not searched !
;   ENV_VAR:        name of a environment variable containing a path
;   USE_PATH:       if this keyword is set the path of IDL is used for
search
;   SEARCH_TREE:    if this keyword is set the search is expanded to all
subdirs of the
;                   given directories, equivalent to a preceeding '+' in
the directory name
;   FILE_COUNT:     if set to named variable the number of file hits is
returned
;   DIR_COUNT:      if set to a named variable the number searched
directories is returned
;   DIR_FOUND:      if set to a named variable a string array of
searched dirs is returned
;   RETURN_MESSAGE: if set to a named variable the message is returned
;
; OUTPUTS:
;   Result: string or string array contining the full path of the file

R. Bauer