Powershell script to create vst3 ini files

Moderator: Bob L

GUE
Posts: 11
Joined: Sat May 22, 2004 12:00 pm

Powershell script to create vst3 ini files

Post by GUE »

if you have a lot of plugins this will help you

you can call this function in an powershell window [run powershell.exe]

if your VST3 Pluhins are in the Standard folder (C:\Program Files\Common Files\VST3)
with following syntax

.\AddVST3.ps1 -VST_Plugins c:\tmpvst

c:tmpvst is an example u can Also Use (c:\Sawstudio64\VST_Plugins) or the path to your VST_Plugins directory

or use al parameters in the script

.\AddVST3.ps1 -VST_Plugins path_to_your_VST_Plugins_Folder -VST3Directory Path_to_your_vst3_folder

put the code in a file named AddVST3.ps1

Code: Select all

param(
    [string]$VST3Directory = "C:\Program Files\Common Files\VST3",
    [string]$VST_Plugins
)

# targetdir check if exists and create it
if (-not (Test-Path $VST_Plugins)) {
    New-Item -ItemType Directory -Path $VST_Plugins | Out-Null
}

# find  .vst3 files recursively
$files = Get-ChildItem -Path $VST3Directory -Filter *.vst3 -Recurse -File

foreach ($file in $files) {

    # create ini File
    $iniName = [System.IO.Path]::GetFileNameWithoutExtension($file.Name) + ".ini"
    $iniPath = Join-Path $VST_Plugins $iniName

    # content: Full Path
    $content = $file.FullName 

    # write in US-ASCII
    Set-Content -Path $iniPath -Value $content -Encoding Ascii
}


hope this helps
cu GUE ;)
Carl G.
Posts: 4010
Joined: Mon Jun 07, 2004 12:00 pm
Been thanked: 4 times

Re: Powershell script to create vst3 ini files

Post by Carl G. »

Where would I put this file to run it? In the default SAWStudio or SAC VST directory?
(maybe if I have to ask, I shouldn't run it.... but I'm willing to try)
Guest

Re: Powershell script to create vst3 ini files

Post by Guest »

You can run the script from anywhere, even on the Desktop.
you specify the paths witch the parameters.

So step1 is to create an empty File named AddVST3.ps1
Step 2 put the code into the file
Step 3 open Powershell and navigate to the directory where the file exists
step 4 run the command in Powershell
----
for Example with all setups in standardmode Sawstudio is in c:\sawstudio64 run following command

Code: Select all

.\AddVST3.ps1 -VST_Plugins c:\Sawstudio64\VST_PlugIns -VST3Directory C:\Program Files\Common Files\VST3
If You encounter an Errormessage regarding Executionpolicy you can check your current executionpolicy with
the command:

Code: Select all

Get-ExecutionPolicy
it should return restricted, remotesigned or others

in this case you have to enter following command:

Code: Select all

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
then run the script again

after this dont forget to reset your executionpolicy back to original.
mostly "Restricted"

Code: Select all

Set-ExecutionPolicy -ExecutionPolicy Restricted
hope this is clear for you

cu
GUE
Posts: 11
Joined: Sat May 22, 2004 12:00 pm

Re: Powershell script to create vst3 ini files

Post by GUE »

Sorry forgot to mention:
you have to save the file with the code in it.

cu

gue
Post Reply