As a general rule, web content is not permitted by the browser to do arbitrary things like that on the user's computer, because if it were, any website you visit could pretty much take over your computer, and that would be bad.

You can use an input element with type="file" to allow the user to select and upload an individual file from their computer. But the user gets to pick the file, and the web server only gets sent the one file they pick. Running Perl code on the server, this is absolutely the closest you can get to what you asked for.

If you explore the possibility of client-side applets that utilize a major plugin (e.g., Java), you may find a loophole through which you can slip part of what you need to do. But I would not be surprised if you run into a brick wall in the form of the security model even there.

Of course, if you write your own plugin, it can do more or less whatever it wants -- *if* the user is willing to install it. Which they almost always will not be. This approach can work in certain special situations, e.g., if you're developing a corporate intranet application and the IT department can deploy the plugin on every workstation in the organization. For a website for general consumption, though, it's not going to fly.

Active-X used to be a gaping wide-open security abdication that would allow this sort of schenanighans to be pulled off on MSIE on Windows (if the user clicked the yes button), but due to the obviously unacceptable security problems that created Microsoft has improved their security model over the last several years and this is really no longer workable. Thank goodness.

However, all of that only answers the question you actually asked. Without more background, I can't say for sure, but it's possible that maybe there's some more feasible way to accomplish what your site really needs, without violating the security barriers that protect users from malicious websites. If you explained more about why your website wants this kind of information, maybe there's another way to accomplish the necessary part of what the site actually needs, a way for your site to provide the actual useful features it wants to provide without reading the user's CD-ROM drive.

-- 
We're working on a six-year set of freely redistributable Vacation Bible School materials.

In reply to Re: How to Read local CDROM content from web page by jonadab
in thread Read local CDROM content from web page by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.