comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: recursive FILE_SEARCH in a symbolic link ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: recursive FILE_SEARCH in a symbolic link ? [message #71368] Thu, 17 June 2010 13:56 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
I'm working in Linux...
What I mean is that I do not want a code that does not work in
Windows, that's all.

My symbolic links are links to directories created using the command
ln -s target link_name

nata
Re: recursive FILE_SEARCH in a symbolic link ? [message #71372 is a reply to message #71368] Thu, 17 June 2010 12:47 Go to previous messageGo to next message
jdehls is currently offline  jdehls
Messages: 6
Registered: September 2008
Junior Member
On Jun 17, 12:28 pm, nata <bernat.puigdomen...@gmail.com> wrote:
> Hi guys,
>
> I have a directory containing some symbolic links. When I try to do a
> recursive file search, IDL does not take into account the links.
> Do you know how can I do this search, through all the links ?
> I want to avoid Windows errors so I need an standard solution...
>
> Thanks in advance,
> nata

You say you are working in Windows? How did you create the symbolic
links? Are they symbolic links, hard links or directory junctions? I
think what you want to do is create directory junctions using the
mklink command.
http://www.maxi-pedia.com/mklink
Re: recursive FILE_SEARCH in a symbolic link ? [message #71466 is a reply to message #71368] Thu, 17 June 2010 18:03 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Thu, 17 Jun 2010 13:56:33 -0700 (PDT), nata wrote:

> I'm working in Linux...
> What I mean is that I do not want a code that does not work in
> Windows, that's all.
>
> My symbolic links are links to directories created using the command
> ln -s target link_name
>
> nata

Hello nata,

I made a test on Windows. I created some links on a NTFS drive with
the cygwin ln-command:

$ ln text.txt hardlink_to_file.txt
$ ln -s text.txt softlink_to_file.txt
$ ln -s ../folder2 softlink_to_folder

And what shall I say, FILE_SEARCH finds them all. Here are the
results:

IDL> f=file_search('test\folder','*')
IDL> print,f,format='(a)'
test\folder\hardlink_to_file.txt
test\folder\softlink_to_file.txt.lnk
test\folder\softlink_to_folder.lnk
test\folder\test.txt
IDL> print,!version
{ x86 Win32 Windows Microsoft Windows 7.1.2 Oct 28 2009 32
64}

Note that Windows added the extension ".lnk" to the soft links.

HTH, Heinz
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: New tool: sort points by countries with a shapefile and IDL
Next Topic: Memory Cleanup-- Messy structure

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:20:16 PDT 2025

Total time taken to generate the page: 0.80063 seconds