Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    14

    Unanswered: lame.exe input and output files location

    Does anyone know how to make lame.exe look in a variable location for the input wav file and the output mp3 file in my Access db?
    I got as far as to make the file names variable. For the location it always takes MyDocuments. Putting the path in the string of the input and output file names is not working, when the path contains a space (C:\Program Files\MyProgram\MyMP3\)

    Dim FileName As String
    Dim path As String
    Dim ShellStr As String

    FileName = "01MyTest"
    path = CurrentProject.path & "\"
    ShellStr = path & "lame.exe " & FileName & ".wav " & FileName & ".mp3"
    Shell ShellStr

    Thanks,
    Ben
    Last edited by BMore; 03-24-07 at 12:10.

  2. #2
    Join Date
    Feb 2006
    Location
    Floating around NW;UK
    Posts
    11
    Hi Ben,

    Try

    ShellStr = """" & path & "lame.exe " & """" & FileName & ".wav " & FileName & ".mp3"

    There is a more elegant solution but this should work.

    Cheers,

    IRGo
    On the floating point.

  3. #3
    Join Date
    Mar 2007
    Posts
    14
    Thanks IRGo, but it's not there that I'm having the problem.

    The problem is to have a path at the input and output files part, having a space in it.
    ... & path & FileName & ".mp3"

    Ben

  4. #4
    Join Date
    Feb 2006
    Location
    Floating around NW;UK
    Posts
    11
    Hi Ben,
    Sorry I did'nt understand the problem. I generally use a shell script with echo to logfile then you can see what happens in DOS.
    Hope this helps, if not try more info or search this site there is so much here..... sorry just back from pub....... will look again tomorrow.
    Cheers,
    IRGo
    On the floating point.

  5. #5
    Join Date
    Mar 2007
    Posts
    14
    all I get is that the lame.exe is not working when the input and/or outputfile location contain a space. So, solved it by creating a "spaceless" path on the c: drive letting lame.exe work with that, then I copy the output file to where I want it with the filename I want. I'm sure there must be a better way, but this works fine in the meantime.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Don't forget your validation!
    Code:
    'pseudo code
    If Len(Filename) > Len(Replace(Filename, " ", "")) Then
     MsgBox "The filename contains spaces
    End If
    George
    Home | Blog

  7. #7
    Join Date
    Mar 2007
    Posts
    14
    Why would I do that, as the filename is created after the lame.exe usage and is never going to be "lamed" again?
    If the path and filenames created for "lame" as input/output files are renamed by someone for some reason, they will just be created again. I might even kill them at closing the database and recreate on opening.
    Last edited by BMore; 03-29-07 at 18:56.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •