WatchDirectory Forum
watchDirectory forums >> How to... >> Copy Files Plug in

Message started by jmendoza on Oct 23rd, 2012 at 5:09pm

Title: Copy Files Plug in
Post by jmendoza on Oct 23rd, 2012 at 5:09pm
Wanted to see if there is a way for me to only trigger the task if a certain criteria in the name matches. Files are named with specific dates on the filename. I just want to capture or copy the files for the day the task is scheduled to run.

For example:

The plug in would run every morning at 8:00 a.m. So if it runs on Oct. 30th. I need all files that contain "1030" on the name to be copied everything else it should ignore.

So I guess what I am asking is can we use dynamic naming on the filter events?

Can you help? Thanks.


Title: Re: Copy Files Plug in
Post by Gert on Oct 24th, 2012 at 9:59am
Hello Joe,

The current WD version (free upgrade, just install over your version) has the option to use a "filter script", a batch file that determines if a detected file should be ignored or not.

Here is an example that checks if the detected file starts with the current MMDD.
[code]@echo off
rem this filter script (see )
rem checks if the detected file (%WD_FILE_N% - see )
rem starts with the current month/day (MMDD).

rem last 4 positions of WD_DATE (which has the current date in YYYYMMDD format)

rem first 4 positions of the detected file
SET F4=%WD_FILE_N:~0,4%

IF %MMDD% EQU %F4% GOTO :ProcessThisFile

GOTO :DoNotProcessThisFile




WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.