Can this be done?

Results 1 to 4 of 4

Thread: Can this be done?

  1. #1
    Rob Speicher Guest

    Default Can this be done?

    As an example, let&#039s say I&#039m working with a bunch of mp3 files. I want to read all the mp3&#039s in a directory and then either<BR><BR>1) Write them to a database<BR>2) Just display em on a page, so the server gets all the mp3&#039s in the directory every time the script is processed. Obviously number 1 is easier on the server, but can the database be updated if the number of mp3&#039s in the directory is &#062; or &#060; than the number of mp3&#039s logged in the database?<BR><BR>After that, I want to make it searchable etc. obviously the database would be easier (if the only option possible). Any ideas?

  2. #2
    Martin Guest

    Default RE: Can this be done?

    1. I know it is possible, but I dont know how....<BR>2. There is plenty of shareware programs that can do

  3. #3
    Join Date
    Dec 1969

    Default RE: Can this be done?

    It can be done with ASP&#039s FileSystem Object. The object provides information on number of files, folders etc. To do what you want you would run a script to pull all the file information into a database. Once this is done, you could compare the number of files vs. the record count in the database daily or put it in the global.asa to run this Session OnStart; if the count in the database is different than the file count, run the script to update the database information.<BR>A lot of documentation on the FileSystem Object is available at:<BR><BR><BR>It will take some work but should be pretty slick once you are done.<BR><BR>

  4. #4
    Rob Speicher Guest

    Default RE: Can this be done?

    Great.<BR><BR>Next question: Is there a way to determine the artist and songname from an mp3 filename if all of them are named in a similar fassion, like:<BR><BR>(artist)-songname<BR><BR>So artist is everything inbetween () and song is everything after )- (to avoid errors from artists with hypenated names)<BR>

Posting Permissions

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