How to change uploaded files put files default location for mapping command?



How to change uploaded files "put files" default location for mapping command.


  1. On the filter navigation, there's a menu option called Discovery Commands, that leads to a tables where all relevant commands that the pattern mechanism use populated - some Java, some scripted.
  2. Filter for command type PUT_FILE, and you'll see that there are currently two commands - one for Windows and the other for SSH (Linux etc.).
  3. Attached to this KB a custom script, based on the SSH java code.  Upload the record, and you'll see it on this table.
  4. Its order is 50, so give the other two order 100.
    5. If you'll go inside the script, you'll see that the targetFolder. Change it to "/home/srvcenow/".
    6. The command should work as long as they have the proper permissions to this folder.

Release or Environment


Additional Information

It's now global, meaning that every pattern that uses SSH and runs the put file command will put files into this folder.
You can make it specific to IP Addresses or hosts by simply changing the script.
Also, it has a side affect that it always runs the "mkdir -p /tmp/sntmp/" folder - I couldn't work around that, but it doesn't put anything under this folder.
It may not be 100% perfect, but this one should do the trick.