Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Monitor Folder for new files then Print Them

Posted on 2012-09-15
4
Medium Priority
?
3,111 Views
Last Modified: 2012-09-16
Hi guys,

I have a folder that I need to monitor, and as soon as a new file is added, mainly clear text files, I need to print them to the default printer. I am running this on Windows Server 2008 R2.

I found a script on this site which is attached as test2.vbs that does exactly what I need but its giving me an error and since I am not much of a scripting guy I though you might help me.

Its giving me the error attached as error.png

It was suggested to me that above this line: Set objFolder = objShellApp.Namespace(objFile.Parent)

I add: WScript.Echo "Found " & objFile.Path

and see whether the path if a full UNC path.

The result is attached as capture.png.

Can someone help me solve this?
test2.vbs
error.PNG
Capture.PNG
0
Comment
Question by:mbusuttil
4 Comments
 
LVL 28

Assisted Solution

by:burrcm
burrcm earned 1000 total points
ID: 38401570
Printfile - http://www.lerup.com/printfile/

Chris B
0
 
LVL 12

Expert Comment

by:Amick
ID: 38401586
--Withdrawn--
0
 
LVL 59

Expert Comment

by:Bill Prew
ID: 38402050
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 1000 total points
ID: 38403998
Oh I see the problem!  Change this line:
	Set objFolder = objShellApp.Namespace(objFile.Parent)

Open in new window


to this
	Set objFolder = objShellApp.Namespace(objFile.ParentFolder)

Open in new window


Regards,

Rob.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question