print files

  • Thread starter Thread starter eddiec
  • Start date Start date
E

eddiec

Hi,

I want to iterate through a number of files in a Windows directory and
- Open each one in Internet Explorer
- Print to the default printer with no user interaction

The reason these files need to be opened in IE is becuase the only
viewer we have for viewing these files is an IE add-on.

How do I go around doing this in C#? Any leads would be much
appreciated

Cheers,

eddiec :-)
 
Hi EddieC,

Peter Duniho's suggestions are always better than mine, but here's how I'd
attack it:

Create a DirectoryInfo object set to "a Windows directory"

For each file in the DirectoryInfo object that is of the type you want, make
the following call:
Process.Start("iexplorer.exe", fileInfo.FileName);

Be warned, though: You could potentially be looking at thousands of files
opening up in IE, and your PC could quickly exhaust its memory before you
have a chance to stop it. Test small, first.

Hope that help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top