Roku Developer Program

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

Rename File


I have a BrightSign player XD1230. I was wondering if it is possible to rename a file programmatically? Two files on my BrightSign player are autorun.brs and autorun.brs.swap. When a user holds down a GPIO button for over five seconds I would like to rename autorun.brs to autorun.brs.swap and autorun.brs.swap to autorun.brs and then reboot the system. I have a feeling this may not be possible but I thought it couldn't hurt to ask. I have looked in the BrightScript Language Reference Docs but have been unable to find anything relating to renaming a file. For the meantime I can use CopyFile("old", "new") and then DeleteFile("old") but this feels like more work then necessary.

Thanks in advance for your responses,


SOLVED: Found a function named MoveFile(a As String, b As String) that seems to do the job.
0 Kudos