Moved discussion the AO Community
Methods on how to accomplish this depend on your implementation of AO. If AO is running on Windows and the remote file you are trying to read is on a Windows System as well (or on a System accessible via CIFS) you could pass the filename as \\remote-server\directory\filename.txt. This assumes of course that your AO servers have access to the file.
If your AO instance is running on Linux and/or your file is located on linux or simply not accessible via CIFS, you will need to become a bit creative and retrieve the contents of the file some other way. For instance, getting the contents by using the SSH/Telnet workflows to do a "cat" on the file, or perhaps retrieve it via SCP/SFTP/FTP prior to reading it.
Richard, thank you very much for taking the time to answer mi thread.
Both AO and the external servers are windows environment.
In this situation AO doesn't have credentials to access the external server. I need to provide a set of credentials to it. Meaning that the solution \\remote-server is not possible. However, what I have used before is Autopilot-ad-Utilities\Terminal\Windows Command. In there there is a possiblity to run a command in an external server providing hostname or ip, credentials. I've been using that normally the thing is that command is creating a file I need to read as well. I need to take advantage of the fact the connections is already established and get the file contents from it. I folund out that is only possible to use with one command only at a time. For instance if I execute a commnad and in the next line I added another command; this one is added as a parameter to the command in the first line.
Is there a way I can add another line inside Utilities\Terminal\Windows Commnad to execute another one?
Or pehaps Using Terminal\File\Read I can accomplish that in a way?
I don't know I'm lost and I know that worst case scenario will happen. For me would be another process running the same command in the external server and overwriting the output file created from the first one. That is the reason I'm avoiding to run two separate connections one to run the command and another to read the output file.
Thank you again Richard.
Hmmm. Have you considered running multiple commands in a one-line command?
You mentioned you use the Windows Command adapter to execute a command that creates the file. Within this same connection, you now also want to READ that, correct?
Let's say the command you are running is called "generatefile.exe", perhaps you can try:
generatefile.exe && type <generated file.txt>
In windows, && seperates commands. See http://support.microsoft.com/kb/279253
One other option is to create a batch file with multiple commands in it, copy the batch over and invoke that batch file using Windows Command adapter. Create a batch file using File adapter and then copying+invocation can be done using Windows Command adapter.
Thank you I was missing that point & is the way to go unless BMC has a more elegant way. I'd implemented and it works.
Thank you but I tried that before I posted this and I was receiving errors.
Glad that your query was resolved by using multiple commands in a one-line command option. You can also see https://docs.bmc.com/docs/display/public/baob201203/Adapter+request+and+response+for+the+Windows+Command+adapter for details about using the Windows Command adapter for passing multiple commands (in a batch file) as a single command in the adapter request. Hope that helps. Thanks.