in reply to Re: Bugs in File::Find on Windows
in thread Bugs in File::Find on Windows

Thanks. But that won't solve the problem, because getcwd() only tells you the cwd of the current drive, not of any of the other drives.

Replies are listed 'Best First'.
Re^3: Bugs in File::Find on Windows
by eric256 (Parson) on Feb 16, 2007 at 01:05 UTC

    getdcwd('C:');


    ___________
    Eric Hodges

      Perfect!

      O.k., that's half the solution. Is there a symmetric "chddir" as well? chdir doesn't seem to do it.

      A word spoken in Mind will reach its own level, in the objective world, by its own weight

        Depends on what you consider symetric.

        To change the current drive without changing the current dir on that drive:

        chdir('C:');

        To change the current dir of a drive without changing the current drive:

        my $drive = substr(getcwd(), 0, 2); chdir('C:\\'); chdir($drive);