2

Does anyone know of a Dir.glob pattern that will follow windows shortcuts (*.lnk) instead of just interpreting them as files? I would like to have a directory watcher follow shortcuts on a NTFS drive. I'm looking for something like

glob: **/*.lnk/**/*

but working ;-).

I'm aware of Can I traverse symlinked directories in Ruby with a "**" glob? and was able to do it with symlinks on unix file system, but this does not seem to have an effect in my setting with windows links (nor does it work with OSX aliases, it seems).

Community
  • 1
  • 1
Isabi
  • 151
  • 4
  • 12
  • I doubt that one exists. The glob will have to enumerate all the *.lnk files, open them individually to extract the target of the shortcut and then do a watch on that. It gets worse when someone creates a .lnk file; the watcher will have to see this creation, open/retrieve and start a new watch on the target. – MJZ Aug 03 '13 at 22:10
  • There's also the issue of how shell references use ObjectID to locate the target when the user moves it. – MJZ Aug 03 '13 at 22:11

0 Answers0