Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing files from a script 1

Status
Not open for further replies.

PhillipFoster

Technical User
May 23, 2002
41
GB
I need to print all the files in a folder and move them to another directory. The move has to work before the next file is printed.

I've been on this *simple* problem for a week now and have been able to do the print part or the move part, but not both.

Can someone please save what's left of my hair please.

Thanks - Phil.
 
PhillipFoster,

Out of curiousity. What are you trying to print? Are they all text files? Images? RTF? PDF? Word? Excel? .. The following is my ramblings based on trying to read "between the lines" of your request.

What is the problem you are really having?

Is how to print text files via WSH the issue?
If text, would suggest you check out Gunter Born's site:
Newsletter & is about printing via wsh.

Is how to print Word (similar for other MS Excel/Access/Powerpoint) the issue?
Using Word To Print

Is finding the files the issue?
List Filesystemobjects In Specified Path...


Is copying files the issue?
Backup Files (copy) With Logging Version 2


Is finding the files programmatically, to use them for printing the issue, and how to copy them the issue?
Searching Through the File System (lower down the page)

What one assumes you want to do is find the files programmatically. One guesses they may or may not have the same file name every time. One guesses you may or may not in copying/moving the files to another directory want to archive them. One cannot guess from your posting what you want to print, and that impacts what engine may or may not work for you.

In the final analysis, if the preceding ramblings cover what you want to do, then it is do'able using WSH/VBScript and Filesystemobject. These will be the main pieces you will need to be working with.

Hope this helps and good luck
DougCranston
 
Doug, thanks very much.

1. I have a directory of faxes in TIF format.
2. I need to print them individually
3. Then move them to another directory
4. Then I need to write a line to a logfile (audit trail)

I've been able to print them or move them, but not from the same script.

I should point out that this is my first script & I haven't done any coding since 1992!

Your reply will hopefully point me along the path to enlightenment :)

Thanks again - Phil.
 
PhillipFoster,

No problem. Newbie to coding.. Wanna be until RIF's took out my support for my servers and my web development. Still learning.

Post a sample of your script. Then will take a look at it.

DougCranston
 
Follow up:

Thanks for the pointers Doug. The program is now up & running.
Your help led me to the solution in pretty quick time.

I think this Internet thingy is great :)

Regards - Phil.
 
PhillipFoster,

Glad could point you to some info and glad you were able to create the solution you needed.

Take care,
DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top