filesearch doesn't find the same files as findfile on a networked drive (unencrypted) [message #36664] |
Thu, 09 October 2003 06:46  |
William Gallery
Messages: 4 Registered: September 2003
|
Junior Member |
|
|
(The original post was encrypted--sorry about that)
I am trying to access files on a networked drive in Windows NT. The
networked drive is:
\\Cygnus\Raytheon_shared
Find file and file_search give different results:
IDL> print, findfile('\\Cygnus\Raytheon_shared\Updated Test Files\*'),
format='(a)'
\\Cygnus\Raytheon_shared\Updated Test Files\.\
\\Cygnus\Raytheon_shared\Updated Test Files\..\
\\Cygnus\Raytheon_shared\Updated Test Files\Test_Data\
\\Cygnus\Raytheon_shared\Updated Test Files\Test_Data_Migration_Tool\
\\Cygnus\Raytheon_shared\Updated Test Files\Test_FITS\
\\Cygnus\Raytheon_shared\Updated Test Files\Test_results\
IDL>
IDL> print, file_search('\\Cygnus\Raytheon_shared\Updated Test Files\*'),
format='(a)'
IDL>
I.e, file_search finds no files at all. If I map the networked drive
to a drive letter, e.g. G:, both routines give the same result.
What am I missing about file_search?
|
|
|
Re: FILESEARCH [message #56966 is a reply to message #36664] |
Sat, 24 November 2007 23:15  |
mkmvarma
Messages: 24 Registered: November 2007
|
Junior Member |
|
|
On Nov 24, 4:44 pm, David Fanning <n...@dfanning.com> wrote:
> mkmva...@gmail.com writes:
>> I tried to find the the hdf files in a specified directory using
>> Filesearch and findfile. but idl could not find any?? can anybody help
>> me out?? i am just appending below what i had in my code
>
>> fname ='C:\Documents and Settings\Mahesh Varma\My Documents\osiris\'
>> result = FINDFILE('\fname\*.hdf');,[COUNT=num])
>> PRINT, FINDFILE('*.hdf')
>
> I think you should use FILE_SEARCH, since FINDFILE is
> obsolete. And you are not concatenating strings properly.
> You want something like this:
>
> fname ='C:\Documents and Settings\Mahesh Varma\My Documents\osiris\'
> files = FILE_SEARCH(fname + '*.hdf', COUNT=num)
> FOR j=0,num-1 DO Print, files[j]
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks David.... It worked.... thanks very much
|
|
|
Re: FILESEARCH [message #56968 is a reply to message #36664] |
Sat, 24 November 2007 15:44  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mkmvarma@gmail.com writes:
> I tried to find the the hdf files in a specified directory using
> Filesearch and findfile. but idl could not find any?? can anybody help
> me out?? i am just appending below what i had in my code
>
> fname ='C:\Documents and Settings\Mahesh Varma\My Documents\osiris\'
> result = FINDFILE('\fname\*.hdf');,[COUNT=num])
> PRINT, FINDFILE('*.hdf')
I think you should use FILE_SEARCH, since FINDFILE is
obsolete. And you are not concatenating strings properly.
You want something like this:
fname ='C:\Documents and Settings\Mahesh Varma\My Documents\osiris\'
files = FILE_SEARCH(fname + '*.hdf', COUNT=num)
FOR j=0,num-1 DO Print, files[j]
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|