title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Converting a whole folder or multiple files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Unregistered

    Converting a whole folder or multiple files

    Would like to automate nightly process of converting multiple files (~1000 per day).

    Using scripting means have to use addfromfile and list each individual file in script.

    File Selector is nice tool to convert entire folder structure, but can it be called from script or command line?
  • Spoon
    Administrator
    • Apr 2002
    • 43919

    #2
    >Using scripting means have to use addfromfile and list each individual file in script.

    Your script could be smart and do a search for files and addfromfile on found file, convert...and so on.
    Spoon
    www.dbpoweramp.com

    Comment

    • Unregistered

      #3
      Would like the script to be smart. However I am not, and do not know how to perform such functionality beyond the help info for scripting.

      Is this an easy task?

      Thanks

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 43919

        #4
        If you knew programming in visual basic, there are functions to call that can search for files and you can pass them (don't ask me though, I last touched VB 7 years ago).
        Spoon
        www.dbpoweramp.com

        Comment

        • Unregistered

          #5
          Just a quick note to let you know....

          Had a VB guru look at. Wrote a few lines and now converting folders automated by Task Scheduler every night.

          Thanks.

          Comment

          • Unregistered

            #6
            is it to late to share? I would like to do the same thing maybe even post the VB script and ow to use it?

            Comment

            • Unregistered

              #7
              Will put a post together in the next couple of days with the script.

              Comment

              • Unregistered

                #8
                call waveconvert("mycnv")

                Sub WaveConvert(directory)

                ' ================================================== ================================
                'These next few lines are directly from dbconverter script

                ' 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 = True

                dMC.ConvertToFolder = False ' Puts converted file into same folder
                ' ================================================== ================================

                ' Because we put each days recordings into a folder based on the Month, then a sub-folder based on the date, need to create the folder names into variables for path.
                ' There are many ways of doing this. I did it this way.

                myDay = Day(Now)
                myMonth = Month(Now)
                myMonthName = MonthName(Month(Now))
                myYear = Year(now)

                myYear = right(myYear,2)

                if mymonth < 10 then mymonth = "0" & mymonth
                if myday < 10 then myday = "0" & myday

                myFolder = mymonth & "-" & myDay & "-" & myYear


                Dim fso, fldr, fls, fl, fldrPath, fPath, fExt, i
                i=0
                fldrPath = "d:\" & myMonthName & "\" & myFolder & "\"
                fExt = ".WAV" 'MUST BE CAPS
                Set fso = CreateObject("Scripting.FileSystemObject")
                Set fldr = fso.GetFolder(fldrPath)
                Set fls = fldr.Files

                For Each fl In fls
                ' check for file type
                If UCase(Right(fl.Name, 4)) = fExt Then
                ' build full path of file
                fPath = fldrPath + fl.Name

                ' ================================================== ================================
                ' Add My Files to Convert
                Call dMC.AddFromFile(fPath)
                ' ================================================== ================================


                End If
                i = i + 1
                Next

                Call dMC.GoConversion("Wave", True, True, True, False)

                End Sub

                Comment

                Working...

                ]]>