Old 09-22-2017, 07:18 PM   #1
elijahlucian
Human being with feelings
 
Join Date: Dec 2006
Posts: 53
Default ReaScript - how to rename take/file?

I am trying to figure out how to rename a file using Lua... I can't seem to find anything in the documentation. I see a lot of how to manipulate the files location and whatnot, but not how to rename the media or filenames themselves.

any idea?
elijahlucian is offline   Reply With Quote
Old 09-22-2017, 07:21 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

os.rename(oldname, newname)

https://www.lua.org/manual/5.3/manua...#pdf-os.rename

By the way there is a subforum here dedicated to scripting questions: "JSFX and ReaScript Discussion".
cfillion is offline   Reply With Quote
Old 09-22-2017, 07:27 PM   #3
elijahlucian
Human being with feelings
 
Join Date: Dec 2006
Posts: 53
Default

Quote:
Originally Posted by cfillion View Post
os.rename(oldname, newname)

https://www.lua.org/manual/5.3/manua...#pdf-os.rename

By the way there is a subforum here dedicated to scripting questions: "JSFX and ReaScript Discussion".
ohhh!

It's actually (or looks like) it's in the "REAPER Non-English Speaking User Forums"

I think that's probably something that should be put at the bottom or such... There is no real header above that shows that it's different than the non-speaking forums.

Taking my questions there. thanks!

For reference I am actually trying to rename a file in the project... I'm not sure how using the os.rename would be able to do this, unless... maybe I grab the filename from the info?

But after the file gets renamed, would it be 'seen' in the project?
elijahlucian is offline   Reply With Quote
Old 09-22-2017, 07:42 PM   #4
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

EDIT: Moved answer to your new thread.

Last edited by cfillion; 09-22-2017 at 07:53 PM.
cfillion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.