check file fails when using a networked drive letter in path value
search cancel

check file fails when using a networked drive letter in path value

book

Article ID: 380328

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

When using a networked drive letter in a check file path, the check file always fails.

An example path is:
\\testserver\e$\test.txt

In this example, "e$" denotes the drive letter, and the failure is caused by the dollar sign being removed during path resolution: 

Below is a snippet from the AgentService log:

11:59:43.682 ASM6: .AgentService: invoke  SeqNo 41 Agent AMS953WIN Master AMS953 service stack Method checkFile [\\testserver\e$\test.txt, 0, 0, 0:0:00]
11:59:43.682 ASM6: .EnvVariableResolver: RESOLVED = \\testserver\e$\test.txt
11:59:43.682 ASM6: .AgentStack: fileName after resolved = \\testserver\e\test.txt
11:59:43.682 ASM6: .AgentStack: DirPath: \\testserver\e\test.txt

As seen above, the dollar sign character is removed.

Cause

Dollar sign is being resolved like a environment variable such as $PATH resulting in the removal of the dollar sign chracter.

Resolution

Add a tilde in front of the dollar sign. This acts as an escape character which is removed but allow the dollar sign to be intact. Here is an example:

11:59:43.682 ASM6: .AgentService: invoke  SeqNo 41 Agent AMS953WIN Master AMS953 service stack Method checkFile [\\testserver\e~$\test.txt, 0, 0, 0:0:00]
11:59:43.682 ASM6: .EnvVariableResolver: RESOLVED = \\testserver\e~$\test.txt
11:59:43.682 ASM6: .AgentStack: fileName after resolved = \\testserver\e$\test.txt
11:59:43.682 ASM6: .AgentStack: DirPath: \\testserver\e$\test.txt

As you can see from the example, when using a tilde, the dollar sign is kept intact.