Hello,
I need some help...
I am trying to save a random sample name and a text file with the same name.
This works, but I also need to extract the file name WITHOUT extension (.WAV and .TXT) later on to work with it in the patch.
the module 'extract file ext' extracts the extension,
but the module 'extract file name' gives you in fact the 'short filename' but it still has its extension.
Any ideas on how to really extract the file name, without its extension?
Any help appreciated, thanks!!!
Extract file name / extract file ext
You can use this small script
Will be integrated in the next major release
Code: Select all
/////////////////////////////////////////////
// sub File Ext
////////////////////////////////////////////
// parameters declaration
var input : Tparameter;
var output : Tparameter;
// initialisation : create parameters
procedure init;
begin
SetModuleColor($808080+302060);
Input := CreateParam('full file name',ptTextField);
SetIsOutPut(Input,false);
output := CreateParam('out',ptTextField);
SetIsInPut(Output,false);
end;
procedure Callback(n:integer);
begin
SetStringValue(Output,copy(GetStringValue(Input),1,length(GetStringValue(Input))-4));
end;Olivier Sens
www.brainmodular.com
www.brainmodular.com
Great! Thank you very much for your fast reply Senso. Works perfect!!
Who is online
Users browsing this forum: No registered users and 69 guests
