Hi there,
I am having trouble with hidden PDF files.
The Story: Our company runs a piece of software that uses Adobe Acrobat to
look at and pull text from PDF files. As with many a things this software is
prone to crashing. When this occurs then the PDF files that are currently
open get hidden (company policy denies users the ability to see or unhide
files). As you can see this becomes a problem as they can no longer work on
the files.
I have written a small script below to unhide these files which work fine
when files are hidden normally. Yet when the files get hidden from this
application crash when run the script does not unhide the files but returns
the line "Parameter format not correct -". I have been un-able to find out
why the hidden parameter that is attached to the file is invalid. Is there
any way that this can be done using Perl code instead of a system call?
CODE------------------------------------------------------------------------
-----CODE
opendir (INPUT, "D:\\input") || die "Cannot open d:\\input";
foreach $file (readdir(INPUT)) {
if ($file =~ /.*\.pdf/) {
system ("attrib +h d:\\input\\$file");
}
}
closedir (INPUT) || die "Cannot close d:\\input";
CODE------------------------------------------------------------------------
-----CODE
[EMAIL PROTECTED]
United Advertising Publications Plc. Poole BH15 1LL, UK
Tel: +44 (0)1202 445507 Fax: +44 (0)1202 445149
IMPORTANT: Any views or opinions are solely those of the author and do not
necessarily represent those of United Business Media. The information
transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged material. If you
are not the intended recipient of this message, please do not read, copy,
use or disclose this communication and notify the sender immediately. It
should be noted that any review, retransmission, dissemination or other use
of, or taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited.
This email may be monitored.
<<attachment: winmail.dat>>
