1
Script / Re: Copy and convert audio. Can I do this as a script?
« on: November 18, 2017, 20:05:48 »
Hi Reset,
it was an old post, but I hadn't solved it myself yet. With your help and a bit of copy & paste I came up with this now, which does the trick for the selected files in the current directory. No idea how this would work with recursive subdirectories, but this does the trick for now:
P.S.: What is the difference between GetSelectedPaths and GetSourceSelectedPaths? The documentation says:
"An array of the complete paths for all the selected files and folders in the source view" for one
and
"Get an array with the full paths of all selected items in the source view" for the other.
Thanks again!
it was an old post, but I hadn't solved it myself yet. With your help and a bit of copy & paste I came up with this now, which does the trick for the selected files in the current directory. No idea how this would work with recursive subdirectories, but this does the trick for now:
Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $path = GetTargetPath();
@var $SourceFile
@var $s
@var $name
@var $n = 0;
//loop
for( $n = 0; $n < $items; $n++ )
{
$SourceFile = $arr[ $n ];
$name = PathGetNamePart($SourceFile, 1);
$s =' -i ' + '"' + $SourceFile + '" ' + '-map a "' + $path + $name + '.mp3"';
MC.Run CMD="C:\Program Files\ffmpeg\bin\ffmpeg.exe" ARG="{$s}"
}
P.S.: What is the difference between GetSelectedPaths and GetSourceSelectedPaths? The documentation says:
"An array of the complete paths for all the selected files and folders in the source view" for one
and
"Get an array with the full paths of all selected items in the source view" for the other.
Thanks again!