How to search for a particular Directory in all the Drives in windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tprr
    New Member
    • May 2010
    • 1

    How to search for a particular Directory in all the Drives in windows

    Hi all,

    I'm new to perl,
    In one of my requirement, I need to find a particular directory. this directory may be in any drive.

    -> How to get the list of Drives in Windows( C:/ , D:/ etc..)
    -> After this My Perl script need to get into each drive and search a particular dir.
    -> If it is found, then the script need to print the whole path of the dir.

    E.g:-

    Input : "Logfile\testfi ndDir" # this is the dir the script need to find.

    output: "D:\\desktop\Lo gfile\testfindD ir"



    Thanks
    Tpr
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Win32::DriveInf o - drives on Win32 systems

    Comment

    Working...