Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
iHexBot
Visitor

Rename File

Hello,

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,

iHexBot

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