Hi vamsibn,
thanks for providing the details.
I tested this on my box (easy first, then getting advanced):
I created the file C:\utilities\MigrationUtility\Log_NewgenCallUtility\Log_03_02_2017.log
This pattern
s/C:\utilities\MigrationUtility\Log_NewgenCallUtility\Log_$0day$_$0month$_$year$.log/
works fine and maps to (as today it's 03_02_2017 !)
C:\utilities\MigrationUtility\Log_NewgenCallUtility\Log_03_02_2017.log
I then copied the whole folder to a mapped drive Z: (which is \\sov02bac16\software_and_scripts)
Neither
s/Z:\utilities\MigrationUtility\Log_NewgenCallUtility\Log_0$day$_$0month$_$year$.log/
nor
s/\\sov02bac16\software_and_scripts\utilities\MigrationUtility\Log_NewgenCallUtility\Log_0$day$_$0month$_$year$.log/
work, although fromout a DOS prompt all is fine:
dir z:\utilities\MigrationUtility\Log_NewgenCallUtility\Log_03_02_2017.log
02/03/2017 02:03 PM 18 Log_03_02_2017.log
dir \\sov02bac16\software_and_scripts\utilities\MigrationUtility\Log_NewgenCallUtility\Log_03_02_2017.log
02/03/2017 02:03 PM 18 Log_03_02_2017.log
In my case the issue is that SiteScope runs under the Local System Account, and there the drive is NOT mapped.
Logged in as Administrator, I mapped the drive manually
C:\>net use z: \\sov02bac16\software_and_scripts /persistent:yes
C:\>net use
Status Local Remote Network
-------------------------------------------------------------------------------
OK Z: \\sov02bac16\software_and_scripts
Microsoft Windows Network
stopped the HP SiteScope service, changed the Log On Account to Administrator,
and now it works with:
s/\\sov02bac16\software_and_scripts\utilities\MigrationUtility\Log_NewgenCallUtility\Log_0$day$_$0month$_$year$.log/
Check out
http://stackoverflow.com/questions/182750/map-a-network-drive-to-be-used-by-a-service
for some magic hints on mapping files or drives globally and for services.
BTW, if you need to find out whether or not the substitution works,
enable per process debug logging
(Monitor -> Properties -> Logging Settings
check "Enable separate log for this monitor"
and set Log level : DEBUG
After changing anything, you can click on Verify & Save.
If it works, fine, if not, simply go down to
Monitor -> Properties -> Logging Settings and click on View Log,
then you'll see what's going on.
What I found is that it displays the substituion as long as something goes wrong, for example
[Logile bac19 Z:(200981347/31) ] (AtomicMonitor.java:2191) INFO - Running the monitor Logile bac19 Z:
[Logile bac19 Z:(200981347/31) ] (LogMonitorBase.java:1253) DEBUG - Log name [s/Z:\\utilities\\MigrationUtility\\Log_NewgenCallUtility\\Log_$day$_02_2017\.log/] was substituted with: Z:\\utilities\\MigrationUtility\\Log_NewgenCallUtility\\Log_3_02_2017\.log
[Logile bac19 Z:(200981347/31) ] (LogMonitorBase.java:458) DEBUG - unable to read log file
so here I could see that I need to use "$0day$" instead of "$day$
if you only see these entries
[Logile bac19 Z:(200981347/31) ] (AtomicMonitor.java:2191) INFO - Running the monitor Logile bac19 Z:
[Logile bac19 Z:(200981347/31) ] (LogMonitorBase.java:458) DEBUG - unable to read log file
then it usually means that the file doesn't exist or unable to be read.
Greetings
Siggi