W
warrenb101
I'm trying to get the total directory size using perl. Here is a
snippet of what i've got now that doesn't work:
$dirsize = `dir C:\MyDirectory\somefolder . | findstr "File(s)"`;
print "$dirsize\n";
If I run the command from the command prompt it returns the correct
line (which i can later parse out to get the byte count.) but when I
run the perl script it returns results from the directory that the
script is run from not from what i specify in the command.
What am i doing wrong here? Or maybe there is a better way to do
it.....
I'd appreciate anyones help.
Thankx,
WarrenB
snippet of what i've got now that doesn't work:
$dirsize = `dir C:\MyDirectory\somefolder . | findstr "File(s)"`;
print "$dirsize\n";
If I run the command from the command prompt it returns the correct
line (which i can later parse out to get the byte count.) but when I
run the perl script it returns results from the directory that the
script is run from not from what i specify in the command.
What am i doing wrong here? Or maybe there is a better way to do
it.....
I'd appreciate anyones help.
Thankx,
WarrenB