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
Print then move word files (Read 662 times)
RSC
YaBB Newbies
*
Offline



Posts: 12
Print then move word files
Dec 12th, 2016 at 10:09pm
 
I'm evaluating the software, and the evaluation version seems to only be able to do one or the other. I'm trying to constantly monitor a folder for input word files, print any files that appear, and then move them to a done folder.

With the evaluation version, I can create a print task and a move task (both of which work perfectly), but I'm not sure If I can/should run them both at the same time, or if they will conflict with each other.

It sounds like the professional version can do sub-tasks, which sounds like more what I want. One task called "Monitor", with a sub task that prints the documents, and a second sub-task that moves them when finished.

I've emailed support but received no answer, can anyone confirm that this is true, and would the professional version be able to do what I'm looking for?

Any input is greatly appreciated.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Print then move word files
Reply #1 - Dec 13th, 2016 at 7:39am
 
Hello RSC,

I searched for emails from "phoenixcomposition" but didn't find any.

Quote:
I'm not sure If I can/should run them both at the same time, or if they will conflict with each other.

As you guessed, that is not a good idea... If your "move" task gets to the document first, the "print" task will not find the file.

Quote:
the professional version can do

Note that your evaluation version behaves like the "Professional" edition. You can already use the "Subtask" plugin. However, not every type of task can (currently) be run as a subtask. The "Copy files" (which can also move) task can be a subtask but the "print word docs" can not.
A future release will enable more tasks to run as a subtask.

So what can you do now..... Here is what you should do, assuming you want to move the file to C:\DocsPrinted\Done after printing.

* Delete your "move" task, you won't need it anymore
* Stop your "print" task (I assume it is called "print")
* Select the menu "Tools -> Explore Task Directory", this will open Windows Explorer, typically inside C:\ProgramData\WatchDirectory (where tasks and settings are stored)
* open the subdirectory with the name of your task (C:\ProgramData\WatchDirectory\print)
* Inside this directory you will find a script called wd.bat, this is the script that your task calls for every detected document, we are going to change it and add a "move" command.

Open the wd.bat script with notepad or another txt editor. Scroll to the bottom of the script and you will see the following lines of code:
Code:
"%GDPDDE%" %DDEFILE%
DEL %DDEFILE%
%ANNOTATE% Info done
GOTO :EOF
 


The "GDPDDE" line (the first above) is the line that calls word to print the file. Directly after this line you add the line of code to move the document to the done directory. It should look something like this:
Code:
"%GDPDDE%" %DDEFILE%
MOVE "%WD_FILE%" "C:\DocsPrinted\Done"
DEL %DDEFILE%
%ANNOTATE% Info done
GOTO :EOF
 


That should do the trick.
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
 
RSC
YaBB Newbies
*
Offline



Posts: 12
Re: Print then move word files
Reply #2 - Dec 13th, 2016 at 5:19pm
 
Thanks very much for the reply, I'm hoping I can get this to do what I need.

Gert wrote on Dec 13th, 2016 at 7:39am:
Hello RSC,

I searched for emails from "phoenixcomposition" but didn't find any.


I used my work account  Smiley. Try under "GPSL"


Gert wrote on Dec 13th, 2016 at 7:39am:
You will see the following lines of code:
Code:
"%GDPDDE%" %DDEFILE%
DEL %DDEFILE%
%ANNOTATE% Info done
GOTO :EOF
 


The "GDPDDE" line (the first above) is the line that calls word to print the file. Directly after this line you add the line of code to move the document to the done directory. It should look something like this:
Code:
"%GDPDDE%" %DDEFILE%
MOVE "%WD_FILE%" "C:\DocsPrinted\Done"
DEL %DDEFILE%
%ANNOTATE% Info done
GOTO :EOF
 


That should do the trick.


Unfortunately, this hasn't changed anything. It is able to print correctly, but the file does not move after it is done. Here's the exact code I have
Code:
"%GDPDDE%" %DDEFILE%
MOVE "%WD_FILE%" "X:\GPSL\Input\done"
DEL %DDEFILE%
%ANNOTATE% Info done
GOTO :EOF 



Could there be a problem moving the file because it's still in use by word? Does there need to be a delay between kicking off the print and the move in order to ensure that the print has completed and word closes?

Any other suggestions?
Back to top
« Last Edit: Dec 13th, 2016 at 6:40pm by RSC »  
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 658
South Germany
Re: Print then move word files
Reply #3 - Dec 13th, 2016 at 7:12pm
 
You can simply enter a wait by adding a

ping -n 11 127.0.0.1 > NULL

to wait 10 seconds and see if it helps.

But I think something different:
Do you run the task as a service? Then your X: will not be seen by the service when it is a network drive, use \\server\share  instead.
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
RSC
YaBB Newbies
*
Offline



Posts: 12
Re: Print then move word files
Reply #4 - Dec 13th, 2016 at 9:57pm
 
Dirk wrote on Dec 13th, 2016 at 7:12pm:
You can simply enter a wait by adding a

ping -n 11 127.0.0.1 > NULL

to wait 10 seconds and see if it helps.

But I think something different:
Do you run the task as a service? Then your X: will not be seen by the service when it is a network drive, use \\server\share  instead.


That fixed the problem. Thanks very much for the help.

With regards to the X:\ drive, this is a local hard disk, not a network drive.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1