UNC Paths in im_file
Not sure it can be achieved but wanted to check as to what was the best way to use UNC names in the File path.
I want to stage files locally from a remote location, digest and then delete the files.
I have tried "//FileServer/directory/file as well as "\\FileServer/directory/file" without success.
Is it possible to use a variation of im_exec such as
<Input mapdrive>
Module im_file
command net
arg use
arg z:
arg "\\fileserver\directory" ....etc?
Thanks
Ash
The file path is passed to the OS as is so I don't think UNC format has anything to do with that.
In this case probably im_exec is not what you need since the net use command will not emit any logs in itself. If I understand correctly, what you want is basically this:
- mount network drive
- process files
- delete processed files
- unmount network drive
For this I'd recommend creating a script that does this and invoke that periodically. You can use nxlog-processor for step 2.
Otherwise if you still want to run nxlog as a service, you can use the exec() procedure exported by xm_exec which you probably want to call from a <Schedule> block.