|
|
|
06-15-2019, 01:42 PM
|
#1
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Clean all projects ?
Is there a utility or can anyone write one that will clean multiple projects at once? I'd like to take all projects in a subdirectory and clean them all. Any *.rpp file. Not baks. Thanks for any ideas.
|
|
|
06-15-2019, 02:42 PM
|
#2
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Current workaround is to open all the projects in REAPER and then clean one of those opened projects. That works if all projects share the same audio folder and I'm not sure if you need some kind of option turned on (for example, not to offline media in background projects or something like that) because that's the trick. When media is opened in REAPER, REAPER locks it from deleting so cleaning projects that share same audio folder like this prevents you from deleting stuff that are not used by .rpp you're cleaning but are by the other opened .rpp files.
Hope this helps, this is the only trick I'm currently aware of to accomplish something similar to your question.
|
|
|
06-15-2019, 03:22 PM
|
#3
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Well, all of my projects are independent and none of their audio is intermingled. Every one of my project is an island.
|
|
|
06-15-2019, 03:26 PM
|
#4
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by Coachz
Well, all of my projects are independent and none of their audio is intermingled. Every one of my project is an island.
|
Tough luck then, haha. Hope you nail it, it's a useful feature for sure
|
|
|
06-15-2019, 03:42 PM
|
#5
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Thanks. I currently have to go around manually and open each Project, Clean the project and you know waste a lot of time.
|
|
|
06-15-2019, 04:36 PM
|
#6
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Does the RPP list all of the paths to the audio files that are in used ? Could I write a script that parses through all the paths and delete every other file that's not and audio file in the path?
|
|
|
06-16-2019, 01:13 AM
|
#7
|
Human being with feelings
Join Date: Sep 2010
Posts: 459
|
Quote:
Originally Posted by Coachz
Every one of my project is an island.
|
I like that phrase. My projects are islands as well. No mingling. Anti-social little buggers.
But let me ask (perhaps a naïve question): What do you clean out of projects? I just leave them as they are. Everything seems to work fine, but maybe things could be better.
|
|
|
06-16-2019, 01:25 AM
|
#8
|
Human being with feelings
Join Date: Dec 2011
Posts: 2,167
|
Can't a Project be saved to a new Folder as a SAVE-AS ?
Only the essential files should be in the new Folder. [?]
|
|
|
06-16-2019, 05:10 AM
|
#9
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by mixer
I like that phrase. My projects are islands as well. No mingling. Anti-social little buggers.
But let me ask (perhaps a naïve question): What do you clean out of projects? I just leave them as they are. Everything seems to work fine, but maybe things could be better.
|
When you do edits, glue, freezes and renders, Reaper creates new files and leaves behind dozens and dozens of files that are not longer needed. Cleanup throws those files out leaving a directory of audio files of only items in the current project.
If you were to go to an old backup, you might be missing files if you did a clean up but when I get to a good place in a project, I'm happy to clean up and leave the old behind. With backups ever 15 mins here, my last few backups are very close to my current project.
It looks like the .rpp project file has the listings of audio files being used under areas like
<SOURCE WAVE
FILE "AudioFiles\instruments2-004.wav"
>
so I could probably write a cleanup script that gets a list of them all and then removes all files not in the list. Then have the script do it for entire directories of projects.
|
|
|
06-16-2019, 05:49 AM
|
#10
|
Human being with feelings
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
|
I like this utility - https://sonic.supermaailma.net/software
Haven't tried it on the "parent" folder of all projects though.
|
|
|
06-16-2019, 06:13 AM
|
#11
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Skorobagatko
|
hmm, I ran it on a single project folder and got.
I showed no files and didn't show the 2 that Reaper cleanup wants to remove. Apparently it's designed to look at multiple projects in the same dir and compare their needed files.
Also, when I pointed it to a parent directory if found no project files meaning it didn't descend into subfolders.
|
|
|
06-16-2019, 05:51 PM
|
#12
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Coachz
Is there a utility or can anyone write one that will clean multiple projects at once? I'd like to take all projects in a subdirectory and clean them all. Any *.rpp file. Not baks. Thanks for any ideas.
|
If you're not using Windows then just ignore this post!
I'm not sure how you store you projects but I use a separate folder for each project, only record in WAV, all recorded WAVs are saved to project root folder (or to subfolder one level below project root.
I made one where you drop project folders, it then gets the newest RPP file from the project folder, parses it to get WAV file names used in proj, then compares the names to WAV files found in either the project root or in a sub-folder if it exist (not both), coded in VB.Net.
I just copied some files so it would find unused WAVs,..
https://github.com/Edgemeal/VB.Net/b...eaner/Form1.vb
|
|
|
06-16-2019, 06:37 PM
|
#13
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
Quote:
Originally Posted by Edgemeal
If you're not using Windows then just ignore this post!
I'm not sure how you store you projects but I use a separate folder for each project, only record in WAV, all recorded WAVs are saved to project root folder (or to subfolder one level below project root.
I made one where you drop project folders, it then gets the newest RPP file from the project folder, parses it to get WAV file names used in proj, then compares the names to WAV files found in either the project root or in a sub-folder if it exist (not both), coded in VB.Net.
I just copied some files so it would find unused WAVs,..
https://github.com/Edgemeal/VB.Net/b...eaner/Form1.vb
|
How do you run this? I downloaded the file, tried running from the cmd but no success? I thought windows would know what to do with .vb file natively?
|
|
|
06-16-2019, 06:44 PM
|
#14
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Breeder
How do you run this? I downloaded the file, tried running from the cmd but no success? I thought windows would know what to do with .vb file natively?
|
That ^ file is just the main window form code, Its part of Visual Studio project (vb.net), you could download my vb git as zip, it only has this one project in it. I didn't want to upload this as exe, it deletes files!
|
|
|
06-17-2019, 04:50 AM
|
#15
|
Human being with feelings
Join Date: Sep 2010
Posts: 459
|
Quote:
Originally Posted by Coachz
When you do edits, glue, freezes and renders, Reaper creates new files and leaves behind dozens and dozens of files that are not longer needed. Cleanup throws those files out leaving a directory of audio files of only items in the current project.
If you were to go to an old backup, you might be missing files if you did a clean up but when I get to a good place in a project, I'm happy to clean up and leave the old behind. With backups ever 15 mins here, my last few backups are very close to my current project.
It looks like the .rpp project file has the listings of audio files being used under areas like
<SOURCE WAVE
FILE "AudioFiles\instruments2-004.wav"
>
so I could probably write a cleanup script that gets a list of them all and then removes all files not in the list. Then have the script do it for entire directories of projects.
|
Ok. Thanks for the info. I'll take a closer look at my projects.
|
|
|
06-17-2019, 05:12 AM
|
#16
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Edgemeal
If you're not using Windows then just ignore this post!
I'm not sure how you store you projects but I use a separate folder for each project, only record in WAV, all recorded WAVs are saved to project root folder (or to subfolder one level below project root.
I made one where you drop project folders, it then gets the newest RPP file from the project folder, parses it to get WAV file names used in proj, then compares the names to WAV files found in either the project root or in a sub-folder if it exist (not both), coded in VB.Net.
I just copied some files so it would find unused WAVs,..
https://github.com/Edgemeal/VB.Net/b...eaner/Form1.vb
|
Thank you but unfortunately I also use mp3s for my samples and some of them get dropped right into the tracks as media items.
|
|
|
06-17-2019, 11:10 AM
|
#17
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Coachz
Thank you but unfortunately I also use mp3s for my samples and some of them get dropped right into the tracks as media items.
|
I mainly posted it because I thought you were C#/VB coder and could tweak it or get ideas to write your own. FWIW, Github updated, code now detects and removes unused WAV and MP3.
|
|
|
06-17-2019, 12:34 PM
|
#18
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Edgemeal
I mainly posted it because I thought you were C#/VB coder and could tweak it or get ideas to write your own. FWIW, Github updated, code now detects and removes unused WAV and MP3.
|
Cool. I'll check it out. I coded for 30 years and now try not to code but some things are a must have. :-) thank you edgemeal
|
|
|
06-17-2019, 01:29 PM
|
#19
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
I compiled it and it works very nicely. Thanks for such a cool utility. I can just drag all my projects into it and it expertly throws out the unused wav and mp3 files !
Super job Edgemeal. Thanks ! Do you want me to post the exe for others ?
|
|
|
06-17-2019, 02:15 PM
|
#20
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Coachz
I compiled it and it works very nicely. Thanks for such a cool utility. I can just drag all my projects into it and it expertly throws out the unused wav and mp3 files !
Super job Edgemeal. Thanks ! Do you want me to post the exe for others ?
|
If you think its safe enough, I don't really know enough about REAPER and plugins file storage, I just wrote it for what I see on my own setup, I was just worried it might delete wrong files on others/different setups.
|
|
|
06-17-2019, 02:51 PM
|
#21
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Edgemeal
If you think its safe enough, I don't really know enough about REAPER and plugins file storage, I just wrote it for what I see on my own setup, I was just worried it might delete wrong files on others/different setups.
|
Yeah, I think it's good. I also added a readme.txt to make sure users have backups. Thanks again and for anyone wanting to download a windows x86 version EXE (tested here in windows 10 64 bit) here is the link. Just click the download arrow on the top right.
https://drive.google.com/file/d/1pUV...ew?usp=sharing
Please let us know of any problems any of you might have and thanks again Edgemeal !
Last edited by Coachz; 06-18-2019 at 01:40 AM.
|
|
|
06-17-2019, 03:35 PM
|
#22
|
Human being with feelings
Join Date: Nov 2010
Posts: 2,436
|
SO NICE! Thank you both (Coachz & Edgemeal)!!!!!
|
|
|
06-17-2019, 05:59 PM
|
#23
|
Human being with feelings
Join Date: Dec 2011
Posts: 2,167
|
Thanks !!
|
|
|
06-18-2019, 10:21 AM
|
#24
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
A few things I wanted to add,..
v1.02 - June 18, 2019
+ Stay On Top option.
+ Play selected audio file.
+ Double click file opens Windows Explorer to file folder.
+ Dropping folders on exe launches app and processes folders.
+ Set icon for exe/app window.
# Compile changed to Any CPU (run as 64bit on x64 OS).
Considering the simple basic code used its faster then I thought it would be.
(source and exe in zip)
REAPER Project Cleaner v1.02 (Win10)
REAPER Project Cleaner v1.02 (Win7)
Last edited by Edgemeal; 06-18-2019 at 10:53 AM.
|
|
|
06-18-2019, 10:32 AM
|
#25
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Edgemeal
A few things I wanted to add, (testing on Win7).
v1.02 - June 18, 2019 (source and exe in zip)
+ Stay On Top option.
+ Play selected audio file.
+ Double click file opens Windows Explorer to file folder.
+ Dropping folders on exe launches app and processes folders.
+ Set icon for exe/app window.
# Compile changed to Any CPU (run as 64bit on x64 OS).
Considering the simple basic code used its faster then I thought it would be.
|
Doesn't run here. windows 10 64 bit
|
|
|
06-18-2019, 10:38 AM
|
#26
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Coachz
Doesn't run here. windows 10 64 bit
|
I haven't looked at it on Win10, if I had to guess it be the reference to the windows media player (WMPLIb.dll), when I used COM dll on other app I re-compile code on Win10 PC and then it worked for Win10.
EDIT
Recompiled on win10 pc and it works on win10, so one exe for win7, one for win10 is easiest fix.
EDIT Both of these exe's run on Win7 and Win10 here, no errors. .
REAPER Project Cleaner v1.02 (Win10)
REAPER Project Cleaner v1.02 (Win7)
Last edited by Edgemeal; 06-18-2019 at 11:11 AM.
|
|
|
06-18-2019, 10:55 AM
|
#27
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by Edgemeal
I haven't looked at it on Win10, if I had to guess it be the reference to the windows media player (WMPLIb.dll), when I used COM dll on other app I re-compile code on Win10 PC and then it worked for Win10.
EDIT
Recompiled on win10 pc and it works on win10, so one exe for win7, one for win10 is easiest fix.
REAPER Project Cleaner v1.02 (Win10)
REAPER Project Cleaner v1.02 (Win7)
|
Still doesn't run and this time on download chrome said the file was dangerous. I dl'd it anyways and then unzipped it. When running the exe it popped up Extract/Run dialog and fired of a virus threat warning. no bueno
|
|
|
06-18-2019, 11:05 AM
|
#28
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Coachz
Still doesn't run and this time on download chrome said the file was dangerous. I dl'd it anyways and then unzipped it. When running the exe it popped up Extract/Run dialog and fired of a virus threat warning. no bueno
|
Google gives same warning here for your zip.
I tried the win7 exe on my win10 and visa versa, no errors, guess you have to debug the code, I'll just leave both zips posted.
|
|
|
06-18-2019, 11:08 AM
|
#29
|
Human being with feelings
Join Date: May 2009
Posts: 29,269
|
^It's either/or/both reputation based and zone based. You likely can't get rid of the browser complaining unless it is signed (not worth the extreme expense) and singing may not do it again, due to reputation based. There is usually a link on the page to report it as a false alarm but with a handful of people using it, it likely won't make much difference.
One could right-click the downloaded file > properties and see if there is an unblock button, if so, click it as that's the zone discrepancy block but the download warning is just something to live with.
__________________
Music is what feelings sound like.
|
|
|
06-18-2019, 11:16 AM
|
#30
|
Human being with feelings
Join Date: Feb 2013
Location: Northeast Michigan
Posts: 3,460
|
Early version runs fine on WIN 10 here. Nice!
|
|
|
07-26-2019, 01:29 PM
|
#31
|
Human being with feelings
Join Date: Jul 2016
Posts: 33
|
Quote:
Originally Posted by Skorobagatko
|
holy cow. this is what i wanted. this is my dream come trough. thank you magical forum fairy. i will be on my way now. tra la la
|
|
|
07-26-2019, 01:30 PM
|
#32
|
Human being with feelings
Join Date: Jul 2016
Posts: 33
|
Quote:
Originally Posted by Edgemeal
I mainly posted it because I thought you were C#/VB coder and could tweak it or get ideas to write your own. FWIW, Github updated, code now detects and removes unused WAV and MP3.
|
duuuude! awesomee
|
|
|
01-02-2020, 03:17 PM
|
#33
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Warning! Was just checking my 2019 folder for unused files, one project shows two unused files, so I checked it out and the two files are actually in use by ReaSamplOmatic5000 (which I rarely ever use) , but since the files are not listed as a FILE in the project that cleaner app thinks the files are unused! ! !
Probably should keep those RS5K files in their own sub folder instead of the root of the project.
EDIT I think I figured out how to detect if WAV in a project folder is in use by ReaSamplOmatic5000, its not pretty but seems to be working!
EDIT 2 Updated Function RS5K, if plugin set to multiple files.
Update this function,
Code:
Private Function GetProjWAVs(...)
...
Dim files As New List(Of String)
files.AddRange(RS5K(projData)) ' < ADD this to the function
...
and add this to the project..
Code:
#Region "Get file paths used in ReaSamplOmatic5000"
Private Function FromBase64(ByVal input As String) As String
Dim b64 As Byte() = Convert.FromBase64String(input)
Return System.Text.Encoding.UTF8.GetString(b64)
End Function
Private Function RS5K(projData As String) As List(Of String)
Dim find_s As String = " <VST ""VSTi: ReaSamplOmatic5000 (Cockos)"""
Dim find_e As String = " >"
Dim filepaths As New List(Of String)
For n = 1 To 9999 ' limited to 9,999 instances of the plugin
Dim rs = GetTextBetween(projData, find_s, find_e, n)
If rs = "" Then Exit For ' no more RS5K plugins found
Dim lines = rs.Split({Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
Dim txt As String = "" ' convert base64 to text
For i = 2 To lines.Length - 1 ' according to wiki info files start on line 2.
txt &= FromBase64(lines(i).Trim).Replace(vbNullChar, "*")
Next
If Not txt.StartsWith("*") Then
Dim file As String = txt.Substring(0, txt.IndexOf("*")).ToLower
If file.Contains("|") Then
' plugin set to multiple files
Try
file = file.Substring(0, file.IndexOf(">"c))
Catch ex As Exception
End Try
Dim allFiles = file.Split("|"c)
For Each f In allFiles
If Not filepaths.Contains(f) Then filepaths.Add(f)
Next
Else ' plugin set to single file only
If Not filepaths.Contains(file) Then filepaths.Add(file)
End If
End If
Next
Return filepaths
End Function
Private Function GetTextBetween(MainText As String, StartText As String, EndText As String, Optional occurance As Integer = 1) As String
If occurance < 1 Then occurance = 1
Try
Return MainText.Split({StartText}, StringSplitOptions.None)(occurance).Split({EndText}, StringSplitOptions.None)(0)
Catch
Return ""
End Try
End Function
#End Region
Last edited by Edgemeal; 01-05-2020 at 12:30 AM.
|
|
|
01-03-2020, 10:59 AM
|
#34
|
Human being with feelings
Join Date: May 2006
Location: NA - North Augusta South Carolina
Posts: 4,294
|
I wish there was a "render all projects" function.
|
|
|
01-08-2020, 09:38 AM
|
#35
|
Human being with feelings
Join Date: Mar 2014
Posts: 347
|
I work the same way (which is probably the most common 'best practice' anyway.
I recently decided to clean all my project folders. I have the 'clean project folder' action in my main menu so I basically got some coffee, sat down and went through loading and cleaning every current or recent project. It takes a little time but my soul (and hard drive) were lighter.
Quote:
Originally Posted by Coachz
Well, all of my projects are independent and none of their audio is intermingled. Every one of my project is an island.
|
|
|
|
01-08-2020, 10:22 AM
|
#36
|
Human being with feelings
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,793
|
Quote:
Originally Posted by DarrenH
I work the same way (which is probably the most common 'best practice' anyway.
I recently decided to clean all my project folders. I have the 'clean project folder' action in my main menu so I basically got some coffee, sat down and went through loading and cleaning every current or recent project. It takes a little time but my soul (and hard drive) were lighter.
|
Yeah I have to be aware to keep any files used by samplers outside of the project so that cleaning the directory doesn't delete them because from what I've heard Reaper does not see those which makes sense. But if you drag and drop a cowbell sample into your project directory and use it in one of your sample players then cleaning will probably delete it.
|
|
|
07-28-2020, 05:50 AM
|
#37
|
Human being with feelings
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
|
Quote:
Originally Posted by Edgemeal
I haven't looked at it on Win10, if I had to guess it be the reference to the windows media player (WMPLIb.dll), when I used COM dll on other app I re-compile code on Win10 PC and then it worked for Win10.
EDIT
Recompiled on win10 pc and it works on win10, so one exe for win7, one for win10 is easiest fix.
EDIT Both of these exe's run on Win7 and Win10 here, no errors. .
REAPER Project Cleaner v1.02 (Win10)
REAPER Project Cleaner v1.02 (Win7)
|
Is it the latest version?
|
|
|
07-29-2020, 01:24 PM
|
#38
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Skorobagatko
Is it the latest version?
|
Yes, and I just removed them. Use at your own risk!!!
Its easy to misuse the app if you don't understand what they do, even I was caught off guard because of the way I saved one project and had to write a workaround (post #33).
|
|
|
06-11-2023, 09:57 PM
|
#39
|
Human being with feelings
Join Date: Apr 2021
Location: Mallorca, Spain
Posts: 236
|
What happened to this? The idea was very good.
|
|
|
09-29-2023, 07:09 AM
|
#40
|
Human being with feelings
Join Date: Dec 2021
Location: Jupiter Island
Posts: 956
|
Quote:
Originally Posted by Punchipum
What happened to this? The idea was very good.
|
Ditto!
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:59 AM.
|