in reply to Re^5: Error with GetDRIVE() when using a mapped drive
in thread Error with GetDRIVE() when using a mapped drive

Y drive is a network drive. Here are the results of the snippet

DriveLetter: Y DriveType: 3 IsReady: 1 FileSystem: NTFS TotalSize: 2594847440896 Use of uninitialized value in concatenation (.) or string at E:\APPL\O +EM\checkdr ive.pl line 14. FreeSpac: Use of uninitialized value in concatenation (.) or string at E:\APPL\O +EM\checkdr ive.pl line 14.

Replies are listed 'Best First'.
Re^7: Error with GetDRIVE() when using a mapped drive
by soonix (Chancellor) on Nov 05, 2014 at 08:25 UTC
    Hmmm... that's 2.5 TB - works here with 8 TB ... That raises the following questions:
    • do the numbers look correct, if you execute in a command line shell
      wmic logicaldisk where DeviceID="Y:"
    • are you using a 64bit or 32bit Perl?
      (Although that shouldn't matter, works here with 5.14.2 i386 and 5.18.2 x64)
    • Versions of Perl, Win32::OLE, Windows (also, 64 or 32 bit Windows)?

      -This is perl, v5.10.0 built for MSWin32-x64-multi-thread - The numbers look correct when I run the script in the cmd.exe -Windows 64-bit

        This is mysterious. In my mental model, Win32::OLE is just a wrapper around the win32 API and wouldn't treat FreeSpace differently than TotalSize.

        Perhaps NTFS Misreports Free Space? - perhaps you don't have enough permissions? Is the volume mounted in a special way?