in reply to Re: chdir not working
in thread chdir not working

Can I make it can-insensitive?for example am trying to append "data",if the directory contains "DATA",will windows be able to find it?

Replies are listed 'Best First'.
Re^3: chdir not working
by AnomalousMonk (Archbishop) on Mar 14, 2011 at 22:25 UTC

    The Windows OS file system is case-preserving but case-insensitive.

    c:\>cd @wOrK\PeRl c:\@Work\Perl> c:\@Work\Perl>dir uPD* Volume in drive C is Acer Volume Serial Number is 1234-5678 Directory of c:\@Work\Perl 02/13/2010 07:57 PM 4,098 Updfxgen.pl 02/13/2010 07:57 PM 3,956 Updfxgen.pl1 02/13/2010 07:57 PM 33,199 updgen.pl 02/13/2010 07:57 PM 1,732 Updungen.pl 02/13/2010 07:57 PM 1,589 Updungen.pl1 5 File(s) 44,574 bytes 0 Dir(s) 256,281,104,384 bytes free

    Update: Expanded the example. Also: Perl commands for the Windows API (not for the command line!) accept a / (forward slash) just as well as a \ (backslash), alleviating the need to escape backslashes in double-quoted strings.

Re^3: chdir not working
by ikegami (Patriarch) on Mar 14, 2011 at 22:33 UTC

    If the file system is case-insensitive, then chdir('data'), chdir('Data'), chdir('DATA'), etc will all switch to your data directory, however it was named at creation.

    If the file system is case-sensitive, then only one of chdir('data'), chdir('Data'), chdir('DATA'), etc will switch to your data directory.