Old 04-06-2019, 04:42 PM   #1
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default Get last written file in folder

Is there a way to get the last written file in a folder?
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-07-2019, 03:05 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

Yes but the solution will vary based on the OS and on the language used.
X-Raym is offline   Reply With Quote
Old 04-07-2019, 03:52 AM   #3
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

Great! It should be Windows and Lua.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-07-2019, 06:20 AM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

This works great:
https://forum.cockos.com/showpost.ph...2&postcount=13
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-07-2019, 07:26 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,971
Default

Oh so it was already done ! good !


A MacOS compatibility should be added.
X-Raym is offline   Reply With Quote
Old 04-07-2019, 09:20 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

Yep, I agree. As far as I can see, this command only triggers a windows command line and returns the output. So this should be doable in MacOS as well.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-07-2019, 12:31 PM   #7
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,490
Default

Hmm, this would probably fit better as native function in SWS or Julian's plugin.
Using the shell in any way is always slower than using native stuff.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 04-07-2019, 12:54 PM   #8
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

Yeah, definitely! If anyone wants to take care of it... go for it
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-08-2019, 05:53 AM   #9
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 197
Default

Hey that would be really useful when importing videos you just rendered. I searched in the Reascript API documentation but i couldnt find anything about importing file to the current session via script. Is this something just not doable?
reapero is offline   Reply With Quote
Old 04-08-2019, 05:55 AM   #10
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

https://www.extremraym.com/cloud/rea...c/#InsertMedia
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-08-2019, 06:07 AM   #11
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 197
Default

Damn..should have searched for insert instead of import, or media instead of file, or...

Well, thanks Stevie!
reapero is offline   Reply With Quote
Old 04-08-2019, 06:09 AM   #12
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,643
Default

You're welcome!

Had the same problem as you, back then
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 04-08-2019, 06:36 AM   #13
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,977
Default

Quote:
Originally Posted by reapero View Post
Hey that would be really useful when importing videos you just rendered. I searched in the Reascript API documentation but i couldnt find anything about importing file to the current session via script. Is this something just not doable?
With the new Render API (since Reaper 5.974) you could also set the "Add rendered items to new tracks in project" render option via script and it imports last rendered file automatically (if that's what you want).
nofish is offline   Reply With Quote
Old 04-08-2019, 06:43 AM   #14
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 197
Default

Thasnk nofish!

I was talking of render videos from videogames using a 3rdparty app, then import to Reaper to add sound to them. I didnt explain myself good enough.

But its nice to know you can modify that programticallty anyway
reapero 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 04:30 PM.


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