• 0

trying to make a .bat script... newbie alert...


Question

not sure of any good resources out there for something like this.

basically, i am testing a 32bit to 64bit-bridge -

you have to take the plugin, copy it and the exe to your vst plugins ( http://en.wikipedia.org/wiki/Virtual_Studio_Technology ) folder. It has the name:

plugin_name.64.dll

and

plugin_name.64.exe

so then you have to take the name of the vst you want to bridge, and then rename the plugins so:

Sytrus VSTi.64.dll

and

Sytrus VSTi.64.exe

after that you have to recopy another set of the original plugins, rename them for the next vst, and so on, and so forth.

so ive made a batch file:

del "*.64.dll"

del "*.64.exe"

copy X:\VSTPlugins\64test\plugin_name.64.exe

copy X:\VSTPlugins\64test\plugin_name.64.dll

rename plugin_name.64.exe "Sytrus VSTi.64.exe"

rename plugin_name.64.dll "Sytrus VSTi.64.dll"

copy X:\VSTPlugins\64test\plugin_name.64.exe

copy X:\VSTPlugins\64test\plugin_name.64.dll

rename plugin_name.64.exe "BFD2.64.exe"

rename plugin_name.64.dll "BFD2.64.dll"

the first command deletes ANY of the files with .64 in the file name, which only apply to the bridged plugins. I do this in order to clear the old plugins from an old build.

then, i copy the bridge files from a neutral folder into the vst plugins folder, and then rename those files with the name of the plugin i want to bridge. After that, i repeat.

Is there a way to make this easier?

I have TONS of vst plugins.

is there a way i can just:

delete all of the .64 files (already figured that out)

and then

for EACH .dll that exists in X:/vstplugins and its subfolders, i need to get the name, while leaving the extension out, taking the name of the dll and then applying it to the bridge plugin, and then continuing the process for each file.

Is there a way to make this easier without having to put every single filename into the .bat file?

keep in mind there are subfolders involved and im pretty sure the .dll and .exe needs to be in the same folder as the original.

obviously i have to be very careful not to hose anything. I dont want to overwrite any of my plugin dlls, even tho they are muy backedupito i dont want to risk it.

any help would be wonderful.

__________________

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Cmd Promt I am not very good at, but here a VBS script that will list a Folder and all it

Sub Folder Contents. This will make a list of all the files in the Parent Folder and Sub all

of it Sub Folders, this will make a text file of all the contents.

I have not added any command for delete and rename, I was not sure on how you wanted

to rename all the files. I will add those later if you want.

Save As ListDir.vbs

Option Explicit
'-> Makes The Folder Where The Script Located The Parent Folder
Dim Loc :Loc = "."
'-> You Can Put A Full Path EG Loc = "D:\MyFolder\SomeFolder"
Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Dir :Set Dir = Fso.GetFolder(Loc)
Dim Lne :Lne= "------------------------------------------------------"
Dim Txt :Txt = Fso.GetFolder(Fso.GetParentFolderName(WScript.ScriptFullName)) & "\List.txt"

Dim Ts
 Set Ts = Fso.CreateTextFile(Txt)

  Ts.WriteLine Lne & vbCrLf & UCase(Dir.Path) & vbCrLf & Lne
  Recursive Fso.GetFolder(Loc)
  Ts.Close 
  CreateObject("Wscript.Shell").Run("notepad.exe " & Chr(34) & Txt & Chr(34)),1,true

   Function Recursive(Folder)
	Dim Col :Set Col = Folder.files
	Dim File
	For Each File In Col 
	  Ts.WriteLine "  " & File.Name
	Next
   Dim Obj
	For Each Obj In Folder.subFolders
	  Ts.WriteLine Lne & vbCrLf & UCase(Obj.Path) & vbCrLf & Lne
	  Recursive Obj
	Next
   End Function
Link to comment
Share on other sites

  • 0

Your requirements are

I have TONS of vst plugins.

is there a way i can just:

delete all of the .64 files (already figured that out)

and then

for EACH .dll that exists in X:/vstplugins and its subfolders, i need to get the name, while leaving the extension out, taking the name of the dll and then applying it to the bridge plugin, and then continuing the process for each file.

Is there a way to make this easier without having to put every single filename into the .bat file?

YES. I wrote a little script for you. It is written in biterscripting. Download biterscripting free by following instructions at http://www.biterscripting.com/install.html .

I am assuming the following.

1. The list of plugins is derived from the files in X;/vstplugins.

2. You want to retain the directory structure when copying files. For example X:/vstplugins/A/B/p1.dll should be copied to ./A/B/p1.dll, etc.

Here is the code.

cd "whereever you want to copy files to"

# Get the list of .dll files from X:/vstplugins
var str list; lf -rn "*.dll" "C:/vstplugins" > $list

# Work with one file at a time
while ($list <> "")
do
	# Get the name of the next file.
	var str file; lex "1" $list > $file

	# The file name in $file is in full path, like "X:/vstplugins/.../plugin1.64.dll".
	# Get the name of the plugin by extracting portion after the last slash (/), then
	# removing the .dll part. Preserve $file, we will need it later to retain directory
	# structure when copying files.
	var str plugin; stex -p "^/^l[" $file >$plugin; stex "[^.dll^l" $plugin

	# Get the original dir path.
	var str orig_dir; stex "]^/^l" $file > $orig_dir

	# Create the new dir path (where files will be copied to) .
	# For this we replace X:/vstplugins/ with ./ .
	var str new_dir; sal "^X:/vstplugins/^" "./" $orig_dir > $new_dir

	# Copy $orig_path/$plugin.exe to $new_path
	var str orig_file; set $orig_file = $orig_dir+"/"+$plugin+.exe
	system copy ("\""+$orig_file+"\"") ("\""+$new_dir+"\"")

	# Copy $orig_path/$plugin.dll to $new_path
	set $orig_file = $orig_dir+"/"+$plugin+.dll
	system copy ("\""+$orig_file+"\"") ("\""+$new_dir+"\"")
done

I am wrapping the paths sent to the system command within double quotes, using ("\""+something+"\"") because path and file names may contain spaces, etc.

I have not tested this because I don't have your correct directory structure etc. Let me know if you have any problems.

Sen

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.