- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 07:15 PM
We have MID servers setup on different OS, one on Windows and one on UNIX. In MID Server Script included a path is needed to get a file on the export directory of the mid server agent directory. What command can I use to get the file directory that will work for both Windows and Linux? Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 07:19 PM
If you want it on SN then you can go to ecc_agent.list and get home_dir field.
Run below in background script and see what you get.
var gr = new GlideRecord("ecc_agent");
gr.addQuery('status', 'Up');
gr.query();
while (gr.next()) {
gs.print(gr.home_dir);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 07:19 PM
If you want it on SN then you can go to ecc_agent.list and get home_dir field.
Run below in background script and see what you get.
var gr = new GlideRecord("ecc_agent");
gr.addQuery('status', 'Up');
gr.query();
while (gr.next()) {
gs.print(gr.home_dir);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2020 08:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 05:12 PM
This worked. Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 08:26 PM