• Hello Guest!

    We have recently updated our Site Policies regarding the use of Non Commercial content within Paid Content posts. Please read the new policy here.

    An offical announcement about this new policy can be read on our Discord.

    ~The VaMHub Moderation Team
  • Hello Guest!

    We posted an announcment regarding upcoming changes to Paid Content submissions.

    Please see this thread for more information.

Deleting older VAR versions

KajaGoo

Member
Messages
51
Reactions
25
Points
18
Hi

Is there a tool or a batch (power-shell) script or Total Commander plug-in that would automatically delete all older versions of a VAR package in a specified folder, and leave the latest version?

For example, there are following packages in a folder:

KajaGoo.BestSceneEver.1.var
KajaGoo.BestSceneEver.2.var
KajaGoo.BestSceneEver.4.var
KajaGoo.EvenBetterScene.110.var
KajaGoo.EvenBetterScene.155.var
KajaGoo.EvenBetterScene.161.var

I would like to remove all files except KajaGoo.BestSceneEver.4.var and KajaGoo.EvenBetterScene.161.var.

Could you help?

Thanks!
KG
 
Nevermind, I've found the right tool. VAR Manager. There was a rough start, but after clicking SETTINGS and setting up proper directories, now the tool works like a charm. It has the option to move "stale VARS" to a different folder.

Is is also an excellent tool to clean up the VAR folder and see what is in the packages - looks, scenes, clothes, etc. Lots of filtering available. Installing / uninstalling VARS from the repository outside VAR folder (makes symbolic links in Addons folder).

The initial database scanning (UPD_DB) and analyzing VAR dependencies (Depends Analysis - Installed Packages) takes a long time though, but it is only done once, after installing the tool.
 
Last edited:
Never heard of this tool before... this guy definitely is doing not enough advertisement. There were so many requests for a tool like this here at the hub.
I will try this out tomorrow, and if it works, I will recommend it to everyone asking every single week again and again for a tool like this. He might get hundreds of downloads every day, if this is somewhat good.
 
Yeah, what's up with that. Never heard of it neither. Why isn't it on the HUB especially if it's already tagged with virt_a_mate? Where's the creator? Is this a possible scam? Just thinking loud.

How does it work, can you give a quick instruction how to implement, KajaGoo?
 
There were so many people desperately asking for this in so many threads. Not a single word from the creator or from anyone else... no offense, but instead of this I am feeling ashamed that I told all those people there is no such a tool. :(
But maybe I should test it out first, before thinking about retirement. ;)
 
But maybe I should test it out first, before thinking about retirement. ;)

For now, the most annoying thing about this tool is the font. I hate it :) I wish there was a way to change it to something more readable.

Apart from that, I've been using it for the past few hours and I got more familiar with it, so I have further comments.

1. For this tool, it is best to keep VAR repository outside VAM folder and point it to this tool in the settings.
2. Scanning my 870GB VAR folder placed on HDD took a lot of time, around 4 hours.
3. Scanning my 870GB VAR folder placed on SSD (Not M.2, a good old S-ATA) took around 20-30 minutes.
4. After launching the tool for the first time, all you have to do is click SETTINGS and set VAM and VAR repository folders. Without doing so the tool will become unstable.
5. After setting the right folders, all you have to do is click UPD_DB. It will build the database that is kept in the tool's main folder, extract all thumbnails from every scene/look/cloth etc. in each VAR, create symbolic links folder. It will also move all 'stale VARS' - meaning older versions - to a separate folder. This feature is the one I was asking about in this thread ;)
6. WARNING - after clicking UPD_DB, this tool will rearrange your original VAR repository folder, making a subfolder for each VAR creator. I am not a fan of this feature, because you can't turn it off. Of course, it all looks cleaner organized this way, but it is a matter of preference.
7. After the scanning has been completed, you have to restart the tool. Then it will open all VARS for previewing. It will show a very nice and readable table with each VAR, how many scenes, appearances, clothes, etc. are in each VAR. Very useful! And you will also be able to preview everything what is in each, highlighted VAR(s).
8. To install VARS (symbolic links that is) for your VAM instance, just highlight up to 50 VARS at one time and click INSTALL. It will install VARS and all of their dependencies (if they can be found in your VAR repository folder) in the VAM AddonPackages folder.
9. This tool has a very useful function - it can look for dependencies in SAVE files. Scenes and looks. If it can find it in your VAR repository folder, you will be able to install them to your VAM folder, so your save or appearance files will be able to load dependencies. Very cool feature.
10. You can filter the table by a creator, or if the VAR is currently installed in your VAM folder. You can also sort by a name, number of scenes, and by many other things.

I am not sure what other buttons do yet :)

That's it for now, I am sure this tool has other functionalities. The tool is fairly new, I wonder if the autor can be contacted or if he wants to keep developing this tool. I would gladly support him if he wishes to add new features to this app. Also, there is a source available, so a programmer can pick it up.

Hope this helps :)

EDIT: I think the author is from China, judging by the characters in his github repository :)
EDIT2: I can't figure out if the function from the 9. is working at all. It seems to find dependencies in save files, but I don't think you can automatically install them... Or I am doing something wrong. Granted, this tool is very fresh, so I don't complain.

KG
 
Last edited:
China ... zip-file ... I'm a little suspicious to be honest. KajaGoo as a new member, don't take it personal.

So it sounds like this tools is reorganizing the whole folder-structure. Doesn't this lead to a lot of missing links within the scenes or apperances or whatever relates to each other?
 
China ... zip-file ... I'm a little suspicious to be honest. KajaGoo as a new member, don't take it personal.
So it sounds like this tools is reorganizing the whole folder-structure. Doesn't this lead to a lot of missing links within the scenes or apperances or whatever relates to each other?

I took the risk, my understanding is that files from Github are safe. Also, my ransomware/virus scanner did not find anything suspictious in it. So far so good. But I understand your concerns. You can always test these kinds of suspictious tools inside a virtual machine.

It seems it does nothing to scenes and appearance files - it does not relocate them or changes them in any way. It looks like it scans them and finds if there are missing dependencies in VAR repository. If it finds missing VARS, it creates a symbolic link to this VAR in VAM/AddonPackages ssubfolder, so VAM can find it.

As for the reorganizing folder structure, it only does it for VAR repository.

KG
 
Thank you @KajaGoo for the very detailed and helpful description!
It has not everything I have asked for in my tool-request some weeks ago... but it has indeed many of the features we were all waiting for.
Wow!

That symbolic linking is more than I have ever asked for. On the first look it sounds very invasive, but on the second one, it is very useful to have the Var repository on a slow but cheap HDD. Did you think it is slower now? AFAIK VaM is scanning all Vars on start.

Without No 9., I would maybe have called the tool useless for my way of using Vam.
I am creating much stuff for myself and I am using many morphs, hair and clothes from many different Vars for my many looks. I like to have all that stuff at hand.
Because of this, I am not sure, If I will ever use that "install on demand" feature of the tool.

If the creator is from China or east-asia, it all makes sense.
Those guys over there are very creative, but IMHO many of them don't like to be part of english-speaking communities, which I can understand very good (read and write with a translator is very cumbersome).
This can easiely explain, why we have never heared about that tool.
This makes this finding even more remarkable, thank you!
 
I will definitely give it a try tomorrow... and I keep my fingers crossed that it doesn't destroy my own precious looks and scenes. ;)
 
I will definitely give it a try tomorrow... and I keep my fingers crossed that it doesn't destroy my own precious looks and scenes. ;)
Well, I made a copy of my VAM instance before trying this tool. I still keep that copy on external disk.
 
Booooring! ;)
But seriously: I have to find some space for my laughable big VaM folder first.
 
How did it go, does this work good and do you recommend to others here?

Btw, google also this Windows Powershell based script pack (slightly different, but indeed makes VAM faster):
VAM Pesadilla DeDuplicator (PDD) 1.0.6

Then there is also FasterVAM.dll behind Patreon paywall.
 
Hi, the tool above (Edit:VARManager) is not mainly to make VaM faster, though it does with reducing the number of Var files.
It is a full size VaM management tool for different tasks.
I still do not really know what I should think about this.
For my taste, it does too much automatically (like creating those hard-links and copy Vars).
It has some very interesting features to look into Vars and scan custom looks,
but for me this unfortunately doesn't work stable.
I stll have only tested this with a dummy VaM folder.
 
Last edited:
Hey, I'd been working on something similar this past year.

The option of removing older versions of VARs is what I meant when I started this thread. I'll test it.

Code:
"Content must first be extracted from VARs for the scripts to work. "

Dealing with VARs instead of extracted files is a right direction to go in my opinion. I don't know if it is possible to deal with VARs in an effective way using powerscript though. If it is, I would love to see it.

The tool I've found, VarManager, is quite unstable, the author can't be contacted and it is not clear if it is still being developed, but I use it every day to deal with my VAR collection and finding dependencies in saved scenes/appearance files.

KG
 
The option of removing older versions of VARs is what I meant when I started this thread. I'll test it.

Code:
"Content must first be extracted from VARs for the scripts to work. "

Dealing with VARs instead of extracted files is a right direction to go in my opinion. I don't know if it is possible to deal with VARs in an effective way using powerscript though. If it is, I would love to see it.

The tool I've found, VarManager, is quite unstable, the author can't be contacted and it is not clear if it is still being developed, but I use it every day to deal with my VAR collection and finding dependencies in saved scenes/appearance files.

KG
Is just using RationalizeVarVersions.ps1 safe to use? I do not want to extract vars either, so after RationalizeVarVersions using Pesadilla DeDuplicator might be a good combo (DeDupeALL.ps1 does all the steps in succession).
 
I get immediately bunch of errors trying to run 2a iHV_Util_RationalizeVARversions.ps:

"
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:233 char:19
+ Sign up
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quot
ation marks ("&") to pass it as part of a string.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:236 char:180
+ ... -details-target btn-link d-lg-none mt-1 color-fg-inherit"> <svg aria ...
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:239 char:16
+ </button> </div>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:244 char:148
+ ... -view-component="true" class="js-details-target btn-link"> <svg aria ...
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:247 char:16
+ </button> </div>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:262 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:267 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:272 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:277 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:282 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: :)) [], ParseException
+ FullyQualifiedErrorId : AmpersandNotAllowed
"
 
It works for me. No errors.

Of course you do execute this script from PowerShell prompt? Also, I put the script file into the main VAM folder, not AddonPackages.
 
It works for me. No errors.

Of course you do execute this script from PowerShell prompt? Also, I put the script file into the main VAM folder, not AddonPackages.
Yes, folder does not matter: same error.
 
Is just using RationalizeVarVersions.ps1 safe to use? I do not want to extract vars either, so after RationalizeVarVersions using Pesadilla DeDuplicator might be a good combo (DeDupeALL.ps1 does all the steps in succession).
I get immediately bunch of errors trying to run 2a iHV_Util_RationalizeVARversions.ps:

"
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:233 char:19
+ Sign&nbsp;up
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quot
ation marks ("&") to pass it as part of a string.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:236 char:180
+ ... -details-target btn-link d-lg-none mt-1 color-fg-inherit"> <svg aria ...
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:239 char:16
+ </button> </div>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:244 char:148
+ ... -view-component="true" class="js-details-target btn-link"> <svg aria ...
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:247 char:16
+ </button> </div>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:262 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:267 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:272 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:277 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
At D:\User\AddonPackages\_2a iHV_Util_RationalizeVARversions.ps1:282 char:7
+ </a> </li>
+ ~
The '<' operator is reserved for future use.
Not all parse errors were reported. Correct the reported errors and try again.
+ CategoryInfo : ParserError: :)) [], ParseException
+ FullyQualifiedErrorId : AmpersandNotAllowed
"
Sorry about that. These problems can be "onions" with layers to work through. Try upgrading your version of Powershell: https://docs.microsoft.com/en-us/po...powershell-on-windows?view=powershell-7.1#msi. Also, check out the other requirements in the .RTF file.
 
Sorry about that. These problems can be "onions" with layers to work through. Try upgrading your version of Powershell: https://docs.microsoft.com/en-us/po...powershell-on-windows?view=powershell-7.1#msi. Also, check out the other requirements in the .RTF file.
Using RationalizeVarVersions.ps1 doesn't alter the VARs themselves, so yes using it to prune files then managing the remaing later using another tool will be "safe" - assuming the other tool is stable.
 
Last edited:
Code:
"Dealing with VARs instead of extracted files is a right direction to go in my opinion. I don't know if it is possible to deal with VARs in an effective way using powerscript though. If it is, I would love to see it."

Most agree with you. I'd only meant to make you aware of the RationalizeVarVersion script.

But now that you mention it, I think many acknowledge that the file architecture encourages issue sprawl and fails at scale. e.g. many 150KB sized files actually have 15KB of original content and 135KB of duplicate content. I suppose the differences among us begins on how to deal with it.
 
Last edited:
Back
Top Bottom