51 users online (1 members and 50 guests)  


  Results 1 to 3 of 3

Related

  1. Help Creating print.css    Forum: CSS Forum
    Replies: 1
  2. Replies: 2
  3. Creating scroll bar    Forum: HTML Forum
    Replies: 1
  4. folders and relative paths    Forum: Javascript Forum
    Replies: 4
  1. #1
    siball's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2007
    Posts
    1

    Newbie help in creating folders

    Hi, complete newbie here. What Im looking to do is create a folder for each name i have listed in an excel spreadsheet. its called list1.xls and i have 400 names in the A column and need to create a folder for each name. Is there a script i can use to make this task easier.

    Appreciate any help anyone can give

  2. #2
    myspacecodeto's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    20

    Re: Newbie help in creating folders

    so you want a script that will recognize the contents of your excel file, and automatically create folders accordingly?

  3. #3
    redlorry919's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    4

    Re: Newbie help in creating folders

    You're probably best saving the excel file as a csv. You can then create a script which reads the csv file and creates a dir for each. Here's some initial guidance:
    PHP Code:
    <?php
    $path_to_csv 
    "myfile.csv";
    $folder_to_create_dirs "myfolder";
    $contents file_get_contents($path_to_csv);
    $lines explode("\n"$contents);
    foreach(
    $lines AS $line) {
      
    mkdir($folder_to_create_dirs."/".$line);
    }
    ?>



Tags for this Thread