RightFax scanning via hot folder

How to set it up:

1. Enable scanning with terminal embedded and use predefined scanning workflows that will be used with the MFP (see help for more information about "Workflow scanning").
2. Copy "scanToRightFax.cmd" into "C:\SafeQ5\Scan"
3. Edit parameters WF_LOGIN, WF_PASSWORD, RIGHTFAX_PATH in "scanToRightFax.cmd"
4. Make sure that the path RIGHTFAX_PATH exists and the credentials provided to it (WF_LOGIN, WF_PASSWORD) have full permissions for read/write/delete.
5. Set up RightFax server to periodically check "RIGHTFAX_PATH" folder for new *.pdf and *.hpf files. The *.hpf file will contain information about user and Fax number provided in the scan workflow. Make sure that RightFax deletes the files that were already processed. Kindly consult RightFax documentation on the setup details.

How to use:

1. Authenticate at YSoft SafeQ terminal embedded
2. Choose Scan in the YSoft SafeQ application
3. Press "Scan" button on the MFP and select your RightFax workflow
4. Edit scan parameters for selected workflow and fill in destination fax number in the field "Fax number" and then start the scan
5. Log off the embedded terminal

Troubleshooting:

See cml.log in <SafeQ_HOME>\logs folder

Scanning workflow content:

<?xml version="1.0" encoding="UTF-8"?>
<scan>
 <name>Fax</name>
 <destination>script</destination>
 <description>Scan and fax via RightFax</description>
 <options>
    <resolution>normal</resolution>
    <sides>1</sides>
    <color>auto</color>
    <fileType>pdf</fileType>
  </options>
  <admin>
    <parameter>
       <pname>script</pname>
       <type>string</type>
       <label>Script command call</label>
       <required>true</required>
       <default>C:/SafeQ5/Scan/scanToRightFax.cmd %file% %login% %dial%</default>
    </parameter>
    <parameter>
       <pname>targetDir</pname>
       <type>string</type>
       <label>Target directory</label>
       <required>true</required>
       <default>C:/SafeQ5/Scan</default>
    </parameter>
  </admin>
  <user>
    <!-- using this parameter, users may enter the fax number on the terminal -->
    <parameter>
       <type>string</type>
       <pname>dial</pname>
       <label>Fax number</label>
       <required>true</required>
       <default></default>
    </parameter>
  </user>
</scan>

scanToRightFax.cmd content:

rem @echo off
@echo on
 
rem Credentials to access to the RightFax INBOX.
set WF_LOGIN=<USER_NAME>
set WF_PASSWORD=<SECRET_PASSWORD>
 
rem Path to the RIGHTFAX scan folder (the path should not be ending by backslash).
rem Create the directory if it does not exist.
set RIGHTFAX_PATH=\\<IP>\<folder>
mkdir %RIGHTFAX_PATH%
 
rem Set the following variable to 1 if the RIGHTFAX_PATH is UNC.
set RIGHTFAX_PATH_CONNECT=1
 
rem Command line arguments.
set FILE=%1
set LOGIN=%2
set DIAL=%3
 
rem Move only .pdf files, ignore the other files.
rem If additional file types should processed, add additional if statements bellow.
if /I (%FILE:~-5,-1%)==(.pdf) goto PROCEED
goto IGNORE
 
:PROCEED
set NEW_NAME=%RANDOM%%RANDOM%%RANDOM%
set DST_FILE=%RIGHTFAX_PATH%\%NEW_NAME%.pdf
set HPF_FILE=%RIGHTFAX_PATH%\%NEW_NAME%.hpf
 
rem Move the scanned file and rename it.
if (%RIGHTFAX_PATH_CONNECT%)==(1) net use %RIGHTFAX_PATH% /user:%WF_LOGIN% %WF_PASSWORD%
move /y %FILE% %DST_FILE%
if (%RIGHTFAX_PATH_CONNECT%)==(1) net use %RIGHTFAX_PATH% /del
 
rem Delete hpf if exists.
if exist %HPF_FILE% del /q %HPF_FILE%
 
echo ##fine >> %HPF_FILE%
echo ##nodelay >> %HPF_FILE%
echo ##b9600 >> %HPF_FILE%
echo ##ecm >> %HPF_FILE%
echo ##description SafeQ Scan to Fax Workflow >> %HPF_FILE%
echo ##pcl >> %HPF_FILE%
echo ##nocover >> %HPF_FILE%
echo ##ScannerName SafeQ >> %HPF_FILE%
echo ##UserName %LOGIN% >> %HPF_FILE%
echo ##Creation >> %HPF_FILE%
echo ##Retry-limit 3 5 >> %HPF_FILE%
echo ##Filename %NEW_NAME%.pdf >> %HPF_FILE%
echo ##dial %DIAL% >> %HPF_FILE%
 
rem Deleting temporary file
del "%1"
 
goto END
 
:IGNORE
rem Do nothing.
 
:END

Scan and fax via RightFax