Guest Jaz Posted February 1, 2008 Posted February 1, 2008 We have a situation where we need to print all files that are in a folder. The user would put a number in a prompt that appears. The number would correlate to a specific folder and print all items in that folder. The folder would consists of word, excel, PDF's and certain images. All I really need is the right command(s) to print the items in the folder. Is there command, script or third party software that can accomplish this? Any suggestions would be appreciated! Thanks, Jasper
Guest Harvey Colwell Posted February 1, 2008 Posted February 1, 2008 Re: Printing all items in a folder. Below is the code to print all files of a given extension. Assuming all of the files in the folder have an application associated with it that supports the Print Verb, meaning that you can Right-Click the file and "Print" is on of the chooses, then you could do away with the Extension check. sEXT = "txt" sFdr = "D:\Scripts\Inventory\Reports" Set oFS = WScript.CreateObject("Scripting.FileSystemObject") Set oFsFdr = oFS.GetFolder(sFdr) Set oShellApp = CreateObject("Shell.Application") Set oShFdr = oShellApp.Namespace(sFdr) For Each oFile In oFsFdr.Files If UCase(oFS.GetExtensionName(oFile.Name)) = uCase(sExt) Then oShFdr.ParseName(oFile.Name).InvokeVerb("&Print") End If Next "Jaz" <jrecto99@yahoo.com> wrote in message news:eZmYPvQZIHA.4028@TK2MSFTNGP06.phx.gbl... > We have a situation where we need to print all files that are in a folder. > The user would put a number in a prompt that appears. The number would > correlate to a specific folder and print all items in that folder. The > folder would consists of word, excel, PDF's and certain images. > > All I really need is the right command(s) to print the items in the > folder. > > Is there command, script or third party software that can accomplish this? > > Any suggestions would be appreciated! > > Thanks, > Jasper > >
Guest rod Posted February 1, 2008 Posted February 1, 2008 Re: Printing all items in a folder. Just in case............. if you have ACDSee, CTRL G will "generate a file listing" "Jaz" <jrecto99@yahoo.com> wrote in message news:eZmYPvQZIHA.4028@TK2MSFTNGP06.phx.gbl... > We have a situation where we need to print all files that are in a folder. > The user would put a number in a prompt that appears. The number would > correlate to a specific folder and print all items in that folder. The > folder would consists of word, excel, PDF's and certain images. > > All I really need is the right command(s) to print the items in the > folder. > > Is there command, script or third party software that can accomplish this? > > Any suggestions would be appreciated! > > Thanks, > Jasper > >
Recommended Posts