Old 03-18-2020, 09:19 AM   #1
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 214
Default read out date of a project file

Is it possible to read from the Reaper Project folder "Date created" and "Date modified" of a project file?

Thanks
Dragonetti is online now   Reply With Quote
Old 03-18-2020, 09:33 AM   #2
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,065
Default

Currently not. I think, this could be a good feature-request for SWS.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is online now   Reply With Quote
Old 03-18-2020, 09:35 AM   #3
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 214
Default

OK Thanks
Dragonetti is online now   Reply With Quote
Old 03-18-2020, 10:12 AM   #4
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,065
Default

In addition to that, you could try to use the system's own command-line-tools to read them out, like ls or dir.

But it's tricky and you need to parse the output of the commands.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is online now   Reply With Quote
Old 03-18-2020, 10:17 AM   #5
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 3,062
Default

The first line of the RPP ends with the save timestamp.
cfillion is offline   Reply With Quote
Old 03-18-2020, 11:24 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,065
Default

Quote:
Originally Posted by cfillion View Post
The first line of the RPP ends with the save timestamp.
Arrr, yes of course! I totally forgot about that.

@dragonetti
If you use my Ultraschall-API, you can use this function to get it, without having to code it yourself:
https://mespotin.uber.space/Ultrasch..._ReaperVersion
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is online now   Reply With Quote
Old 03-18-2020, 11:27 AM   #7
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 214
Default

How can I read them out and put them in a suitable format?

@mespotine I can only enter this manually

it should be integrated into this script.
can someone do that?

https://forum.cockos.com/showthread.php?t=226743

Last edited by Dragonetti; 03-18-2020 at 11:34 AM.
Dragonetti is online now   Reply With Quote
Old 03-18-2020, 11:32 AM   #8
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 2,065
Default

Ok, install my Ultraschall-API and use the function I mentioned:

https://mespotin.uber.space/Ultrasch..._ReaperVersion

I don't remember what kind of format the timestamp itself was. Someone in this forum had it figured out once. I suppose stuff like milliseconds since 1980 or something like that.

Will have a look at that, so I can update my docs and write you a converter.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is online now   Reply With Quote
Old 03-18-2020, 01:08 PM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 3,062
Default

An Unix timestamp is how many seconds elapsed since 1 January 1970.

Code:
local timestamp = 1557262217 -- from the RPP
local humanReadable = os.date('%Y-%m-%d %H:%M:%S', timestamp)
cfillion is offline   Reply With Quote
Old 03-18-2020, 03:02 PM   #10
Dragonetti
Human being with feelings
 
Join Date: Feb 2017
Location: Kiel
Posts: 214
Default

Thanks
Dragonetti is online now   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 05:00 PM.


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