|
I put
in some prints to better see what's happening. Here's the code and
the results:
foreach $xFile (@xFileList)
{
$x = "$local_dir\\$xFile"; $xsize = (stat($x))[7]; print "\nFile tested is $x; size was $xsize.\n"; if ($xsize > 0) { print " WILL process file $xFile (size=$xsize) ...\n"; } else { print " Will NOT process file $xFile (size=$xsize) ...\n"; }; }; Results:
File
to be tested is \\GADGET\SAP$\Test\ship_confirm\bj_so_0083140631.xfr;
size was .
Will NOT process file bj_so_0083140631.xfr (size=)
...
...
Same
output for every file in the directory (16 of them), even though 5 of the files
are not empty.
Laurie
-----Original Message-----
From: Dirk Bremer (NISC) [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 2:31 PM To: Laurie Vien; [EMAIL PROTECTED] Subject: Re: Help getting file size (sheesh) ... Laurie,
I suspect that you are not using a fully qualified filename.
The filename should include the full path to the file.
Dirk Bremer - Systems Programmer II - ESS/AMS - NISC St. Peters USA Central Time Zone 636-922-9158 ext. 8652 fax 636-447-4471
|
_______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
