Creating directory/subdirectory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • briggs
    New Member
    • Dec 2009
    • 5

    Creating directory/subdirectory

    I have a file with below contents. the file is dynamically created with these values.It has two parts separated by _. Basically I need to create a main directory(a,b,c ,d) first part and create the sub subdirectory(se cond part after _) into the respective directory. can you please give few tips to do the same.



    a_1234
    a_1234
    b_12
    a_1234
    c_12
    c_12345
    d_12
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Use File::Path - Create or remove directory trees

    Comment

    • modmans2ndcoming
      New Member
      • Sep 2008
      • 11

      #3
      you will need to do a regex search to parse out the different parts of the file path, then add the directory is needed (use File::Path), and then move the file into the directory.

      Comment

      Working...