NYCPHP Meetup

NYPHP.org

[nycphp-talk] seperating files

Ben Sgro (ProjectSkyline) ben at projectskyline.com
Tue Feb 13 17:24:01 EST 2007


Hello, 

So you are creating directories for each genre and want to move the file into that genre?

If not, you have to create the target directory, check out:
http://us3.php.net/manual/en/function.mkdir.php

You can use http://us3.php.net/manual/en/function.rename.php
to move the file from its current location, say "music/track.mp3" to
"music/instrumental/rock/track.mp3".

- Ben
  ----- Original Message ----- 
  From: selyah 
  To: talk at lists.nyphp.org 
  Sent: Tuesday, February 13, 2007 5:18 PM
  Subject: [nycphp-talk] seperating files


  Hello PHP talk:
  I a very new to PHP and need assistance with an issue.  I am creating a script to reads a list of files (mp3's) from a folder and places them into an array to be separated into different genres (rock, allternatives, hiphop, etc).  My issues how do I go about getting the files after they have being read, to be place into the genre per their description. For example :music/instrumental/rock
  /trackname.mp3. 
  I found the readdir function which helped a great deal in placing them into the array, I just heed a function that does the second part.  Your help would be very appreciated.  Thank you
  selyah


------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070213/6ffc87fa/attachment.html>


More information about the talk mailing list