Multiple possible locations of a video file
#1
Hi,

I have been using XBMC since the original Xbox and love it.
I have run across a problem that isn't really an XBMC problem but I'm hoping to find a solution here... maybe.

I have connected all of my HD's to my router and everytime I boot them they change names. For example USB2_2 becomes USB5_5.
I've tried a number of things which have all failed. The only thing I can think of is if a video file would have multiple locations to look at and play on a successful match.

I doubt there is a way to achieve this but if anyone has any ideas or there is a feature I am unaware of that already does this please let me know.

There must be others who have run into the same problem.
Reply
#2
Thanks for this, I always thought Windows was the only stupid o/s that auto assigned drive letters in the order they appear in the boot (which can change) especially if you forget a USB pen while booting. The solution was to change the name manually way down the alphabet and let windows assign letter to new things. Sounds like the router was designed by the same MS coder Sad or worse windows is still the big culprit and auto names the device plugged into your router. Regardless.... you should try to find if there is any rhyme or reason to the naming and perhaps if it's just a matter of turning on the router before mounting the drive, or when you start the PC etc. Next step would be to appeal to the router manufacturer and see if you can stop the musical chairs.

I suggest multiple path substation statements might be explored. If one path isn't there, then the next might? A script prior to launch might test what the drive letter is to-day and run a specific path sub.
Reply
#3
Thanks for the reply. I should have also mentioned I'm using a USB hub on the router.
A script would be great but how would it identify which HD was which?

I have a batch file floating around somewhere which I can run on boot that maps network drives. If there was just some way of identifying which one was which...
Reply
#4
Well after a bit of researching and experimenting here is the start of a batch file that will fix all my problems!!! Smile

:1
if exist \\192.168.15.1\usb0_1\y.txt (net use y: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_1\y.txt (net use y: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\y.txt (net use y: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\y.txt (net use y: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\y.txt (net use y: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\y.txt (net use y: \\192.168.15.1\usb5_5)

PAUSE


Will have to do this 6 times over for each HD but should hopefully do the trick. Hope this helps someone else.
Reply
#5
Here's the final batch file. Works great.
Code:
net use U: /delete
net use V: /delete
net use W: /delete
net use X: /delete
net use Y: /delete
net use Z: /delete

::U::

:1
if exist \\192.168.15.1\usb0_1\u.txt (net use u: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\u.txt (net use u: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\u.txt (net use u: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\u.txt (net use u: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\u.txt (net use u: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\u.txt (net use u: \\192.168.15.1\usb5_5)

::V::

:1
if exist \\192.168.15.1\usb0_1\v.txt (net use v: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\v.txt (net use v: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\v.txt (net use v: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\v.txt (net use v: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\v.txt (net use v: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\v.txt (net use v: \\192.168.15.1\usb5_5)

::W::

:1
if exist \\192.168.15.1\usb0_1\w.txt (net use w: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\w.txt (net use w: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\w.txt (net use w: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\w.txt (net use w: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\w.txt (net use w: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\w.txt (net use w: \\192.168.15.1\usb5_5)

::X::

:1
if exist \\192.168.15.1\usb0_1\x.txt (net use x: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\x.txt (net use x: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\x.txt (net use x: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\x.txt (net use x: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\x.txt (net use x: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\x.txt (net use x: \\192.168.15.1\usb5_5)

::Y::

:1
if exist \\192.168.15.1\usb0_1\y.txt (net use y: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\y.txt (net use y: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\y.txt (net use y: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\y.txt (net use y: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\y.txt (net use y: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\y.txt (net use y: \\192.168.15.1\usb5_5)

::Z::

:1
if exist \\192.168.15.1\usb0_1\z.txt (net use z: \\192.168.15.1\usb0_1) else (goto :2)

:2
if exist \\192.168.15.1\usb1_5\z.txt (net use z: \\192.168.15.1\usb1_5) else (goto :3)

:3
if exist \\192.168.15.1\usb2_2\z.txt (net use z: \\192.168.15.1\usb2_2) else (goto :4)

:4
if exist \\192.168.15.1\usb3_3\z.txt (net use z: \\192.168.15.1\usb3_3) else (goto :5)

:5
if exist \\192.168.15.1\usb4_4\z.txt (net use z: \\192.168.15.1\usb4_4) else (goto :6)

:6
if exist \\192.168.15.1\usb5_5\z.txt (net use z: \\192.168.15.1\usb5_5)

PAUSE
Reply
#6
Great stuff, I take it you have a USB hub with 5 drives potentially online? I didn't think that was possible on a router.
Reply
#7
Yeah. My router has 2x USB ports and I have attached a USB hub to one of the ports. I only turn them on when I need them.
Reply

Logout Mark Read Team Forum Stats Members Help
Multiple possible locations of a video file0