WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Printing non-PDF/doc files (Read 491 times)
Helpdesk
YaBB Newbies
*
Offline



Posts: 1
Printing non-PDF/doc files
Aug 25th, 2016 at 1:08pm
 
Hi,
we currently use wD for printing PDFs and it's working very nicely.
we now have a requirement to print .htm (and possibly .txt) files as they arrive in a folder - is there a simple way to do this? Do I have to use the .bat file route?
Thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Printing non-PDF/doc files
Reply #1 - Aug 29th, 2016 at 8:18am
 
For txt files you can use the following .bat script:
Code:
@echo off
rem check if it is a txt file, if not quit the script
IF /I "%WD_FILE_E%" NEQ "TXT" GOTO :EOF

notepad /pt "%WD_FILE%" "My Printer"
 


See http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html for all WD_ variables you can use.

Not sure how to print html files.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1