Jump to content

File primitives operate on target of shortcuts


Recommended Posts

On Windows, the primitive File/Directory info returns info about the target file/directory when used on shortcuts, Open File on a shortcut opens the target and so on...

Do you think it is the appropriate behavior? For the OS itself, shortcuts are files.

If a VI lists a directory (as a shortcut C:\Folder1.lnk) and build a path with a listed file name, the result is wrong and unusable (e.g. C:\Folder1.lnk\file.txt").

One can check for the lnk extension but a file/directory can have this extension without being a shortcut... So how to be sure we deal with an actual file/dir instead of a shortcut?

Link to comment

On Windows, the primitive File/Directory info returns info about the target file/directory when used on shortcuts, Open File on a shortcut opens the target and so on...

Do you think it is the appropriate behavior? For the OS itself, shortcuts are files.

If a VI lists a directory (as a shortcut C:\Folder1.lnk) and build a path with a listed file name, the result is wrong and unusable (e.g. C:\Folder1.lnk\file.txt").

One can check for the lnk extension but a file/directory can have this extension without being a shortcut... So how to be sure we deal with an actual file/dir instead of a shortcut?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.