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
WatchDirectory v4.7 beta 1 (Read 4173 times)
Jacob
YaBB Moderator
*****
Offline



Posts: 16
Lyon
WatchDirectory v4.7 beta 1
Jul 4th, 2013 at 9:04pm
 
En anglais pour l'instant Wink

WatchDirectory 4.7 Beta 1

We have a new beta available for WatchDirectory v4.7.

New in this beta:
A new implementation of the System.Mail component which allows secure SMTP connections (SSL or TLS).
The FTP plugin automatically resumes the upload when it is interrupted.
The dynamic function {code{dllname,parameters}} now also allows you to call a batch script.


Download/Install
see last post for download
Just install this beta release "on top" of your current install so it will keep your tasks and settings.



New Email implementation
The beta has a totally new implementation of the email component, but it uses the "old implementation" by default.
Note: When v4.7 is released, the old email implementation will be removed.
If you want to test the new implementation, edit your email settings and check the option "Use beta implementation for email".


Using a Batch script for {dynamic naming}
The scripts you write MUST be inside the directory
<Install Directory>\Resolvers (typically "C:\Program Files (x86)\WatchDirectory\Resolvers")
If you save the below example script as "appendNewXX.bat", you can use the following dynamic name as the target file for "Copy":
C:\Target\{code{appendNewXX.bat,}}

Here is an example batch script you can use. Note besides the environment variables listed here http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html
the following variables are also available:
WD_FILTERRESULT - this variable contains the name of an output file. The script should write its result to this file.
WD_CALLEDFROMSETUP - If this variable contains Y it means the script is called from the WatchDirectory Control Center, otherwise it is called by the real task.

The example script below checks if the detected file already exists in the target directory. If it does NOT exist the script tells WatchDirectory to use the filename "as is".
If it does exist, it returns a name like "NEWxx_originalfilename" where "xx" is a number starting at 01.


Code:
SET TARGETDIR=C:\Target

SET FILETOCHECK=%TARGETDIR%\%WD_FILE_N%
SET RESULTFILE=%WD_FILE_N%
IF NOT EXIST "%FILETOCHECK%" GOTO :FileDoesNotExist

SET COUNTER=0

:NextCounterCheck
SET /A COUNTER=%COUNTER% + 1
Call :PrependZeroes
SET RESULTFILE=NEW%RSLT%_%WD_FILE_N%
SET FILETOCHECK=%TARGETDIR%\%RESULTFILE%
IF NOT EXIST "%FILETOCHECK%" GOTO :FileDoesNotExist
GOTO :NextCounterCheck

:PrependZeroes
SET RSLT=%COUNTER%
IF %COUNTER% GEQ 10 GOTO :EOF
SET RSLT=0%COUNTER%
GOTO :EOF

:FileDoesNotExist
ECHO %RESULTFILE% > "%WD_FILTERRESULT%"
GOTO :EOF
  

Back to top
 

Jacob, support français de watchDirectory&&jacob (at) gdpsoftware (point) com
WWW WWW  
IP Logged
 
Page Index Toggle Pages: 1