Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
sparkerman
Level 7

searching usb drive help

My private channel plays videos from an attached USB thumb drive. Before I play the videos I want to make sure the video is loaded on the thumb drive. I'm trying to use the following code

fg = createObject("roFileSystem")
if (fg.Exists("file://ext1:/test.mov"))
print "it found it"
end if

the above code worked on my older channels but coding with the new RSG format it doesn't seem to work. Is there another way to check for files on a loaded USB drive?
Thanks 
0 Kudos
3 Replies
Highlighted
sparkerman
Level 7

Re: searching usb drive help

I should add that the code is located in my main.brs file
0 Kudos
sparkerman
Level 7

Re: searching usb drive help

I solved it... the path was incorrect. It should be

fg = createObject("roFileSystem")
if (fg.Exists("ext1:/test.mov"))
print "it found it"
end if
0 Kudos
michaelx
Level 7

Re: searching usb drive help

I'm hitting a wall in trying to get a sample app working (I'm a complete beginner too which doesn't help) that lets me play video from a USB stick. 

Do you have a demo that you could post on how you got to show/play videos?
0 Kudos