#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Serach for text files in all subdirectories


    Hello all,

    I would like to search a directory and all subdirectories and copy all txt files to another directory. How do I do that ?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,081
    Rep Power
    1229
    Use the File::Find or File::Find::Rule module to traverse/search a directory tree.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    846
    Rep Power
    497
    In addition to the above mentioned modules, you might want to use the File::Copy module.

IMN logo majestic logo threadwatch logo seochat tools logo