Kodi Community Forum

Full Version: Playing lnk Files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have XBMC setup for a video folder that has my movies. It's working great. Now, sometimes I don't want to put the movie there, rather it's a shortcut to the movie (.lnk, windows). So, following:

http://wiki.xbmc.org/index.php?title=Adv...ensions.3E

I added:


<videoextensions>
<add>.html|.lnk</add>
</videoextensions>

to my advancedsettings.xml

Now, they get get discovered fine... But two things don't happen:

1- I have the option to clean file names, the shortcuts don't get cleaned up.
2- When i click on it, it doesn't play. XBMC doesn't follow the link.

Is there anything I can do to at least make point 2 work?

Thanks a lot..
I don't think there's any way to get XBMC to play a .lnk file, however you could use a symlink to point to your file. You can create symlinks with mklink.exe, however I can't remember which versions of Windows include this.

JR
I guess it has to be added to code that if a lnk file is seen to follow it as shortcut.

I will look for details on mklink, I Am running Windows 7.
ssss25 Wrote:I guess it has to be added to code that if a lnk file is seen to follow it as shortcut.

I will look for details on mklink, I Am running Windows 7.

HTG has this good tutorial on symlinks in Win Vista. I think they should work in Windows 7 too.

http://www.howtogeek.com/howto/windows-v...ows-vista/
Thanks all.

I found a gui tool to do it..

http://www.softpedia.com/progDownload/Po...54632.html

But still I have a problem. The library folder is on a share, the share is really a NAS (D-LINK 323). It seems that I cannot create a symbolic link there. It says successful but I go there I find nothing. If I create it on a local drive, it works.

So, I have to create these links on a Windows NTFS, won't work on a Linux NAS.

I also tried a link in Linux. doesn't show up in Windows.

THanks,
ssss25 Wrote:Thanks all.

I found a gui tool to do it..

http://www.softpedia.com/progDownload/Po...54632.html

But still I have a problem. The library folder is on a share, the share is really a NAS (D-LINK 323). It seems that I cannot create a symbolic link there. It says successful but I go there I find nothing. If I create it on a local drive, it works.

So, I have to create these links on a Windows NTFS, won't work on a Linux NAS.

I also tried a link in Linux. doesn't show up in Windows.

THanks,

Hey ssss25,

The HTG link that I posted outlines that Windows symlinks don't work over a network (unfortunately).

Have you tried simply mapping a network drive to your NAS? I think you're making this more complicated than it needs to be, but I've never used a Linux-based NAS before.

Windows 7: In Computer, click Map Network Drive, enter the address of the server folder (\\MyNAS\Movies\) and give it a drive letter (M: ). XBMC should be able to see the new "Drive" and just add it as a Library path & update library. No need for symlinks or shortcuts.

Again, not sure if the above works when you're accessing a Linux share...but works wonders for Windows. This also doesn't solve your problem if I read your post wrong and your XBMC is installed on Linux and the NAS is Windows.
(2011-02-06, 16:04)ssss25 Wrote: [ -> ]Hi,

I have XBMC setup for a video folder that has my movies. It's working great. Now, sometimes I don't want to put the movie there, rather it's a shortcut to the movie (.lnk, windows). So, following:

http://wiki.xbmc.org/index.php?title=Adv...ensions.3E

I added:


<videoextensions>
<add>.html|.lnk</add>
</videoextensions>

to my advancedsettings.xml

Now, they get get discovered fine... But two things don't happen:

1- I have the option to clean file names, the shortcuts don't get cleaned up.
2- When i click on it, it doesn't play. XBMC doesn't follow the link.

Is there anything I can do to at least make point 2 work?

Thanks a lot..


Here is my solution for the problem,

Download a GUI tool, for Windows, called 'Portable Symbolic Link Creator' that build's your Symbolic link for you:

<http://www.softpedia.com/get/PORTABLE-SOFTWARE/System/System-Enhancements/Portable-Symbolic-Link-Creator.shtml>

This utility can build 6 differend Symbolic link file's.

--------------------------------------------------------------------------------|
Nr | Symlink type / type of link | File size | Filetype | Seen |
| | in | | by |
| | bytes | | RaspBMC |
---|----------------------------------------------------------------------------|
1 | FolderSymbolicLink / SymbolicLink | 0 | shortcut | No |
2 | FolderSymbolicLink / HardLink | n | shortcut | Yes |
3 | FolderSymbolicLink / DirectoryJunction | 0 | shortcut | No |
4 | FileSymbolicLink / SymbolicLink | 0 | | Yes |
5 | FileSymbolicLink / HardLink | n | | Yes |
6 | FileSymbolicLink / DirectoryJunction | 0 | shortcut | No |
--------------------------------------------------------------------------------|

I choose the '4' because this Symbolic link will be seen by RaspBMC and the file length is 0 bytes.
If you have created the Symbolic link than you can't use Ctrl-X, Ctrl-C, and/or Ctrl-V to move or copy the Symbolic link to another

location.
If you do this than the system (Windows) will copy the whole file to its destination and you duplicated your file on your storage device.
So you need to use the 'Symbolic Link Creator' for each file separately.
Don't forget to add the filetype after the filename you give to the file.
If you forget this than RaspBMC doesn't know what to do with it when you ask it to play it.

Maybe you have another solution, than please post it to this forum.
Simply add a second source as a folder on your nas ans put the file or a Linux symlink there.