FW rules file when there is white space in the file path

Everything about Control-M agents installation or setup.
Post Reply
User avatar
jstarkw
Nouveau
Nouveau
Posts: 58
Joined: 14 Jan 2010 12:00

FW rules file when there is white space in the file path

Post by jstarkw » 09 Dec 2011 3:08

Running rules file on windows 2008r2 with 6.4 patch 4 agent

I cannot figure out the corrrect syntax.

Doing this:

INTERVAL 10
FROM_TIME 0100
MIN_SIZE 1
MIN_DETECT 3
WAIT_TIME 30
MON_SIZE_WILDCARD Y

ON_FILEWATCH D:\Unica\Campaign\Partitions\Partition1\Output\Export\BDA Merchandise\*.dat CREATE
THEN
DO_CMD MOVE /Y %FILENAME% D:\Unica\Campaign\Partitions\Partition1\OutputExport\BDA OUTPUT\to_tmp\
DO_EXIT 0
END_ON

Produces this error:

1208 09:20:53 : Unsupported mode 'OUTPUT\*.DAT'


I double quoted the line

ON_FILEWATCH "D:\Unica\Campaign\Partitions\Partition1\Output\Export\BDA Merchandise\*.dat" CREATE
THEN
DO_CMD MOVE /Y %FILENAME% "D:\Unica\Campaign\Partitions\Partition1\OutputExport\BDA OUTPUT\to_tmp\"
DO_EXIT 0
END_ON

and the FW detected the file but the MOVE command errors.

The syntax of the command is incorrect.


What am I missing?

User avatar
jstarkw
Nouveau
Nouveau
Posts: 58
Joined: 14 Jan 2010 12:00

Post by jstarkw » 09 Dec 2011 8:30

Issue solved -

%FILENAME% variable evaluates to the path and the file name. Since the path has a whitespace in I just needed to double quote %FILENAME%

"%FILENAME%

User avatar
jstarkw
Nouveau
Nouveau
Posts: 58
Joined: 14 Jan 2010 12:00

Post by jstarkw » 09 Dec 2011 9:06

Correction: "%FILENAME%"

Post Reply