LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy a shortcut to a file using LabVIEW?

I am trying to copy a folder containing shortcuts (.ink) using the LabVIEW file copy VI in Windows XP. I have tried copying the entire folder and copying individual shortcuts. LabVIEW copies the shortcut's target file to the destination folder instead of the shortcut. However, if I copy a shortcut to internet explorer it works fine. Any ideas of what is going wrong?
0 Kudos
Message 1 of 20
(6,229 Views)
Monroe,
There is nothing wrong. This was a feature of LabVIEW since the start of File I/O VIs. Copying or deleting .lnk files, performs that operation on the original source file that the shortcut is pointing to.
We have been working on changing this behavior, and this should be changed in the next release of LabVIEW.
Zvezdana S.
0 Kudos
Message 2 of 20
(6,227 Views)
I also had a problem with *.lnk files. Trying to write a VI to recursively search directories can get very messed up when there are circular links in place (c:\stuff\mad.lnk pointing to c:\ for example).

I would very much look forward to this behaviour being either removed or perhaps switchable.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 20
(6,227 Views)

Well, i just got Labview 7.1 Base and it is not fixed.

Can someone explain hwy not, and how to do it some other way??

Thx, Conrad

0 Kudos
Message 4 of 20
(6,121 Views)
As a workaround, you can use the good old DOS commands, which don't seem to mind that it's a LNK file. You can probably find some equivalent windows function.

___________________
Try to take over the world!
0 Kudos
Message 5 of 20
(6,118 Views)
Hey ...can anyone plzz guide me to Copy a shortcut from one folder to the other......THE problem is that when I copy a shortcut file (.lnk) file to another folder, it gives an unrecognized file ....whose properties show "Invalid shortcut file" with no target ...for it....Smiley Sad
    Also if  copy an entire folder of shortcuts  to another folder....the same behaviour is observed...!!!

U people seem to be into it....so ...Hope that I will get my....Query solved....!!!
0 Kudos
Message 6 of 20
(6,086 Views)
A fairly simple modification to my last VI should do the trick. I'm not sure if that would be enough for copying a directory of shortcuts, but it probably should be.

___________________
Try to take over the world!
0 Kudos
Message 7 of 20
(6,077 Views)
tst's vi seems not working, for example: Copy lnk.vi.lnk
Nothing get copied.
George Zou
0 Kudos
Message 8 of 20
(6,061 Views)

Nops buddy....it doent seem to work at al.......may be some more.....amendments need to be made.....or can u suggest some other method....to either create a shortcut(.lnk) file ...or.....copy the same......!!!

I m trying really hard in getting this thing done.....!!plzz....contribute........Smiley Indifferent

0 Kudos
Message 9 of 20
(5,953 Views)

Even if you succeed, wont the link in the copied directory point back to the file in the old directory?

Is that what you want?

0 Kudos
Message 10 of 20
(5,939 Views)