#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 Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,923
    Rep Power
    1225
    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
    Posts
    828
    Rep Power
    496
    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