Thread: problem while opening files from multiple directories

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    9

    Unhappy problem while opening files from multiple directories

    hi!
    i'm creating a media playing.. using MCI .... the app dosen't play files from multiple directories... though they are added to the listbox.. they are not played only sound files from a single directories are played. what do i do? -V.G

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    I seem to be a little unclear as to what your question is. Do you mean you're trying to load files from different directories and play each one and it's not working? Or are you loading from different directories and it's only playing the ones from one of them? Or are you loading from different directories and you only want one directory loaded?

    In any case, it sounds like you're having issues with which folder you're in, so I'd look in to the GetCurrentDirectory and SetCurrentDirectory functions.

    -Read it again-
    Ok, it seems what's *probably* happening (though I'm making a big assumption here) is that in your listbox you're only grabbing the filename, and not the directory name. If this is the case, you need to find some way to remember which directory each file is in and then set the directory before loading it (using SetCurrentDirectory) or by adding the directory to the beginning of the filename before you load/play it.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    9
    The problem is that i want to load files from multiple directories and it plays files only from one directory... i.e the one from which the files were last loaded from. the files that were loaded from other directories do not play - V.G

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multiple Source Files, make files, scope, include
    By thetinman in forum C++ Programming
    Replies: 13
    Last Post: 11-05-2008, 11:37 PM
  2. Notepad++ opening ActionScript files
    By sean in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-26-2008, 03:49 PM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. opening files sequentially
    By barneygumble742 in forum C++ Programming
    Replies: 9
    Last Post: 12-21-2006, 11:26 AM
  5. Moving files from one directory to multiple dirs
    By csj561 in forum C Programming
    Replies: 7
    Last Post: 03-18-2005, 03:52 PM