PDA

View Full Version : script converting full directory with sub-dirs



gnd
09-24-2002, 06:27 AM
Hi all.

I'm trying to write vbs script to convert files to ogg. it works on single file, but i cannot figure out how to convert full directory. Or what i really want: to convert full directory structure with all sub-directorys.

What i want to achieve? I have tons of loops that i want to convert to ogg (many thousands of files), so what i want is to select root-dir of loop dir-structure, and just convert all to ogg in one step, replacing all original files.

now my script looks like this:
=====================================
' Create dMC Object
Set dMC = CreateObject("dMCScripting.Converter")

' Set My options (Volume norm off, ID Tag Preservation On, No delete Source files)
dMC.VolumeNormalize = False
dMC.PreserveTags = True
dMC.DeleteSourceFiles = False

' Set Output Folder (to C:\Conversion123 )
dMC.ConvertToFolder = False
' dMC.ToFolder = "C:\Conversion123"

' Add My Files to Convert
Call dMC.AddFromFile("D:\loops\mm\AMBIENT\120BPM\BASS\bass_a1.wav")

' Convert To ogg (want option page, Want Overwrite page, Want finished, Want Errors)
Call dMC.GoConversion("Ogg Vorbis", False, False, True, False)
===========================================

please help.

thnx

gnd

Spoon
09-24-2002, 11:13 AM
Have you seen the File Selector addon for dMC?

Set it to preserve path, and set output to the drive it is on.

gnd
09-24-2002, 04:41 PM
thnx for info.
well, i figured out another way. I make plylist *.m3u, then i right click on it and "convert to". Works perfectly. I converted 22.000 (22 thousand) files in one run. I think thats preety amazing. Works great. Very stable. Great software.

one thing...
Is there a way that it automatically converts mono files to mono ogg, and stereo to stere ogg. That would be nice. And it should use half of stereo bitrate for mono files.

gnd

Spoon
09-25-2002, 02:31 AM
Not at the moment, if you load the files into my Audio Player dAP - you coudl sort on channels and just convert the 1 channel ones.